summaryrefslogtreecommitdiff
path: root/lib/AutoLoader.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-08 16:17:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-08 16:17:32 +0000
commit4d6b4052f6d8ee82bf0dff017df8eaa089f29e9f (patch)
tree1335ca3f1cbd363bfd41d9a99f7cc1075b3049b2 /lib/AutoLoader.pm
parent1d59c5938585e57d4e63102254ee53b59b0bd9ac (diff)
downloadperl-4d6b4052f6d8ee82bf0dff017df8eaa089f29e9f.tar.gz
Integrate changes #11193, 11205, 11209 from macperl.
Fix up AutoLoader to fudge for Mac paths in import(). Allow symbols in try_symbol() to begin with "_". Small portability fix for Mac OS. p4raw-link: @11209 on //depot/maint-5.6/macperl: 6ad6b2be750c4cb30e974afa9b2e179a2f381679 p4raw-link: @11205 on //depot/maint-5.6/macperl: 85661f92e975162c5b6280ce9e0b3cd6ee7563fd p4raw-link: @11193 on //depot/maint-5.6/macperl: 87cd12a80943bf11d0d777d1855d8572168f9887 p4raw-id: //depot/perl@11219 p4raw-integrated: from //depot/maint-5.6/macperl@11217 'merge in' lib/AutoLoader.pm lib/Cwd.pm makedef.pl (@11007..)
Diffstat (limited to 'lib/AutoLoader.pm')
-rw-r--r--lib/AutoLoader.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm
index 10d13ba10c..4b2261ed7d 100644
--- a/lib/AutoLoader.pm
+++ b/lib/AutoLoader.pm
@@ -1,6 +1,6 @@
package AutoLoader;
-use 5.005_64;
+use 5.6.0;
our(@EXPORT, @EXPORT_OK, $VERSION);
my $is_dosish;
@@ -68,7 +68,8 @@ AUTOLOAD {
unless ($filename =~ m{^([a-z?]:)?[\\/]}is) {
$filename = "./$filename";
}
- }elsif ($is_vms) {
+ }
+ elsif ($is_vms) {
# XXX todo by VMSmiths
$filename = "./$filename";
}
@@ -143,7 +144,13 @@ sub import {
my $path = $INC{$calldir . '.pm'};
if (defined($path)) {
# Try absolute path name.
- $path =~ s#^(.*)$calldir\.pm$#$1auto/$calldir/autosplit.ix#;
+ if ($is_macos) {
+ (my $malldir = $calldir) =~ tr#/#:#;
+ $path =~ s#^(.*)$malldir\.pm\z#$1auto:$malldir:autosplit.ix#s;
+ } else {
+ $path =~ s#^(.*)$calldir\.pm\z#$1auto/$calldir/autosplit.ix#;
+ }
+
eval { require $path; };
# If that failed, try relative path with normal @INC searching.
if ($@) {