X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FAutoLoader.pm;h=4bbcb33e1051b7d474fc32802c9c74f3371c478b;hb=8a4f6ac230f3943b15bcb439d434cc52e5da1bc3;hp=1ca3b14520da9a52bdb815d7b04740d8df7abdd2;hpb=98a6f11e5caa62333286d697f0f5df32e778e17a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index 1ca3b14..4bbcb33 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -1,17 +1,17 @@ package AutoLoader; -use vars qw(@EXPORT @EXPORT_OK $VERSION); +# use vars qw(@EXPORT @EXPORT_OK $VERSION); my $is_dosish; my $is_vms; BEGIN { require Exporter; - @EXPORT = (); - @EXPORT_OK = qw(AUTOLOAD); + @EXPORT = @EXPORT = (); + @EXPORT_OK = @EXPORT_OK = qw(AUTOLOAD); $is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32'; $is_vms = $^O eq 'VMS'; - $VERSION = '5.56'; + $VERSION = '5.57'; } AUTOLOAD { @@ -103,7 +103,10 @@ sub import { # Export symbols, but not by accident of inheritance. # - Exporter::export $pkg, $callpkg, @_ if $pkg eq 'AutoLoader'; + if ($pkg eq 'AutoLoader') { + local $Exporter::ExportLevel = 1; + Exporter::import $pkg, @_; + } # # Try to find the autosplit index file. Eg., if the call package @@ -219,14 +222,13 @@ lines: use AutoLoader; use Carp; - use Errno; sub AUTOLOAD { my $sub = $AUTOLOAD; (my $constname = $sub) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { - if ($!{EINVAL} || $! =~ /Invalid/) { + if ($! =~ /Invalid/ || $!{EINVAL}) { $AutoLoader::AUTOLOAD = $sub; goto &AutoLoader::AUTOLOAD; }