From 9a036659c691047471ebdc984eb8a8699dd4d793 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Tue, 17 Sep 2024 22:07:22 +0200 Subject: [PATCH] Storable: remove more pre-5.6 compatbility code This one goes back to commit ab6f8ca19 and was originally meant to provide compatibility with perl 5.004. There is no point in this now that we use three-arg open and 'no warnings' unconditionally elsewhere. --- dist/Storable/lib/Storable.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dist/Storable/lib/Storable.pm b/dist/Storable/lib/Storable.pm index 61e1bf6677ea..3441b1c6f182 100644 --- a/dist/Storable/lib/Storable.pm +++ b/dist/Storable/lib/Storable.pm @@ -123,11 +123,8 @@ EOM } sub file_magic { - require IO::File; - my $file = shift; - my $fh = IO::File->new; - open($fh, "<", $file) || die "Can't open '$file': $!"; + open(my $fh, "<", $file) || die "Can't open '$file': $!"; binmode($fh); defined(sysread($fh, my $buf, 32)) || die "Can't read from '$file': $!"; close($fh);