Skip to content

Commit

Permalink
Storable: remove more pre-5.6 compatbility code
Browse files Browse the repository at this point in the history
This one goes back to commit ab6f8ca 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.
  • Loading branch information
mauke committed Sep 18, 2024
1 parent 5311f0c commit 9a03665
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dist/Storable/lib/Storable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9a03665

Please sign in to comment.