diff options
author | chromatic <chromatic@wgz.org> | 2002-09-13 07:26:08 -0700 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-10-01 08:26:44 +0000 |
commit | 04c1a02be98ce9945e4da9b8fdb006d61420b34d (patch) | |
tree | 3cb4582c5d22bf04953b369aed2d1ef8542242b2 /lib/AutoLoader.pm | |
parent | cb50f42d44feb5486b1014e87f10579f0b7cddbf (diff) | |
download | perl-04c1a02be98ce9945e4da9b8fdb006d61420b34d.tar.gz |
[REPATCH lib/AutoLoader.pm] Remove Dependency on Exporter (take 2 or 3)
Message-Id: <200209131426.08116.chromatic@wgz.org>
p4raw-id: //depot/perl@17948
Diffstat (limited to 'lib/AutoLoader.pm')
-rw-r--r-- | lib/AutoLoader.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index b42d5ff4b6..b20b5dde39 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -1,7 +1,9 @@ package AutoLoader; +use strict; use 5.006_001; -our(@EXPORT, @EXPORT_OK, $VERSION); + +our($VERSION, $AUTOLOAD); my $is_dosish; my $is_epoc; @@ -9,14 +11,11 @@ my $is_vms; my $is_macos; BEGIN { - require Exporter; - @EXPORT = @EXPORT = (); - @EXPORT_OK = @EXPORT_OK = qw(AUTOLOAD); $is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare'; $is_epoc = $^O eq 'epoc'; $is_vms = $^O eq 'VMS'; $is_macos = $^O eq 'MacOS'; - $VERSION = '5.59'; + $VERSION = '5.60'; } AUTOLOAD { @@ -93,6 +92,7 @@ AUTOLOAD { eval { local $SIG{__DIE__}; require $filename }; if ($@) { if (substr($sub,-9) eq '::DESTROY') { + no strict 'refs'; *$sub = sub {}; } else { # The load might just have failed because the filename was too @@ -124,8 +124,9 @@ sub import { # if ($pkg eq 'AutoLoader') { - local $Exporter::ExportLevel = 1; - Exporter::import $pkg, @_; + no strict 'refs'; + *{ $callpkg . '::AUTOLOAD' } = \&AUTOLOAD + if @_ and $_[0] =~ /^&?AUTOLOAD$/; } # |