diff options
author | Chris Nandor <pudge@pobox.com> | 2001-02-12 19:02:43 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-13 14:22:50 +0000 |
commit | 084592ab0b76f3cbd4d089afb08ccea7ba1c9dd8 (patch) | |
tree | 8a175b8128ee3a57f4f96b96a3290adb0eb07399 /lib/AutoLoader.pm | |
parent | 67127a85e86d9ef67c9a136224ffce237c7df32b (diff) | |
download | perl-084592ab0b76f3cbd4d089afb08ccea7ba1c9dd8.tar.gz |
buncha MacPerl patches for bleadperl
Message-Id: <p05010404b6ae6f85e07a@[10.0.1.177]>
p4raw-id: //depot/perl@8792
Diffstat (limited to 'lib/AutoLoader.pm')
-rw-r--r-- | lib/AutoLoader.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index af33ee80f8..ad6bc4013b 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -6,6 +6,7 @@ our(@EXPORT, @EXPORT_OK, $VERSION); my $is_dosish; my $is_epoc; my $is_vms; +my $is_macos; BEGIN { require Exporter; @@ -14,7 +15,8 @@ BEGIN { $is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32'; $is_epoc = $^O eq 'epoc'; $is_vms = $^O eq 'VMS'; - $VERSION = '5.57'; + $is_macos = $^O eq 'MacOS'; + $VERSION = '5.58'; } AUTOLOAD { @@ -38,7 +40,12 @@ AUTOLOAD { my ($pkg,$func) = ($sub =~ /(.*)::([^:]+)$/); $pkg =~ s#::#/#g; if (defined($filename = $INC{"$pkg.pm"})) { - $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s; + if ($is_macos) { + $pkg =~ tr#/#:#; + $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s; + } else { + $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s; + } # if the file exists, then make sure that it is a # a fully anchored path (i.e either '/usr/lib/auto/foo/bar.al', @@ -61,7 +68,7 @@ AUTOLOAD { # XXX todo by VMSmiths $filename = "./$filename"; } - else { + elsif (!$is_macos) { $filename = "./$filename"; } } |