projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1541ec6
)
Switch Storable to IO::File from FileHandle, only load if needed
author
David Leadbeater
<dgl@dgl.cx>
Tue, 8 Mar 2011 21:49:54 +0000
(21:49 +0000)
committer
Father Chrysostomos
<sprout@cpan.org>
Sat, 12 Mar 2011 20:53:26 +0000
(12:53 -0800)
On blead IO::File would be autoloaded but can't rely on this as
Storable is dual life.
dist/Storable/Storable.pm
patch
|
blob
|
history
diff --git
a/dist/Storable/Storable.pm
b/dist/Storable/Storable.pm
index
8d57ab3
..
44b85db
100644
(file)
--- a/
dist/Storable/Storable.pm
+++ b/
dist/Storable/Storable.pm
@@
-19,7
+19,6
@@
package Storable; @ISA = qw(Exporter);
file_magic read_magic
);
-use FileHandle;
use vars qw($canonical $forgive_me $VERSION);
$VERSION = '2.27';
@@
-108,8
+107,10
@@
EOM
}
sub file_magic {
+ require IO::File;
+
my $file = shift;
- my $fh =
new FileHandle
;
+ my $fh =
IO::File->new
;
open($fh, "<". $file) || die "Can't open '$file': $!";
binmode($fh);
defined(sysread($fh, my $buf, 32)) || die "Can't read from '$file': $!";