summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Nandor <pudge@pobox.com>2001-02-12 19:02:43 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-13 14:22:50 +0000
commit084592ab0b76f3cbd4d089afb08ccea7ba1c9dd8 (patch)
tree8a175b8128ee3a57f4f96b96a3290adb0eb07399 /lib
parent67127a85e86d9ef67c9a136224ffce237c7df32b (diff)
downloadperl-084592ab0b76f3cbd4d089afb08ccea7ba1c9dd8.tar.gz
buncha MacPerl patches for bleadperl
Message-Id: <p05010404b6ae6f85e07a@[10.0.1.177]> p4raw-id: //depot/perl@8792
Diffstat (limited to 'lib')
-rw-r--r--lib/AutoLoader.pm13
-rw-r--r--lib/AutoSplit.pm8
-rw-r--r--lib/ExtUtils/MakeMaker.pm3
-rw-r--r--lib/File/Basename.pm10
4 files changed, 25 insertions, 9 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";
}
}
diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm
index 8640576cc7..8fcf528101 100644
--- a/lib/AutoSplit.pm
+++ b/lib/AutoSplit.pm
@@ -264,7 +264,7 @@ sub autosplit_file {
($^O eq 'dos') or ($^O eq 'MSWin32') or
$Is_VMS && $filename =~ m/$modpname.pm/i);
- my($al_idx_file) = "$autodir/$modpname/$IndexFile";
+ my($al_idx_file) = catfile($autodir, $modpname, $IndexFile);
if ($check_mod_time){
my($al_ts_time) = (stat("$al_idx_file"))[9] || 1;
@@ -279,8 +279,8 @@ sub autosplit_file {
print "AutoSplitting $filename ($modnamedir)\n"
if $Verbose;
- unless (-d "$modnamedir"){
- mkpath("$modnamedir",0,0777);
+ unless (-d $modnamedir){
+ mkpath($modnamedir,0,0777);
}
# We must try to deal with some SVR3 systems with a limit of 14
@@ -324,7 +324,7 @@ sub autosplit_file {
my($lname, $sname) = ($subname, substr($subname,0,$maxflen-3));
$modpname = _modpname($this_package);
my($modnamedir) = catfile($autodir, $modpname);
- mkpath("$modnamedir",0,0777);
+ mkpath($modnamedir,0,0777);
my($lpath) = catfile($modnamedir, "$lname.al");
my($spath) = catfile($modnamedir, "$sname.al");
my $path;
diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm
index 9680348c27..a4cd6f46f7 100644
--- a/lib/ExtUtils/MakeMaker.pm
+++ b/lib/ExtUtils/MakeMaker.pm
@@ -205,6 +205,9 @@ sub full_setup {
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
+
+ MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
+ MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
/;
# IMPORTS is used under OS/2 and Win32
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm
index 75996f2d08..94aac2dd44 100644
--- a/lib/File/Basename.pm
+++ b/lib/File/Basename.pm
@@ -240,7 +240,13 @@ sub dirname {
if ($_[0] =~ m#/#) { $fstype = '' }
else { return $dirname || $ENV{DEFAULT} }
}
- if ($fstype =~ /MacOS/i) { return $dirname }
+ if ($fstype =~ /MacOS/i) {
+ if( !length($basename) && $dirname !~ /^[^:]+:\z/) {
+ $dirname =~ s/([^:]):\z/$1/s;
+ ($basename,$dirname) = fileparse $dirname;
+ }
+ $dirname .= ":" unless $dirname =~ /:\z/;
+ }
elsif ($fstype =~ /MSDOS/i) {
$dirname =~ s/([^:])[\\\/]*\z/$1/;
unless( length($basename) ) {
@@ -260,7 +266,7 @@ sub dirname {
chop $dirname;
$dirname =~ s#[^:/]+\z## unless length($basename);
}
- else {
+ else {
$dirname =~ s:(.)/*\z:$1:s;
unless( length($basename) ) {
local($File::Basename::Fileparse_fstype) = $fstype;