Change 16974 by pudge@pudge-mobile on 2002/06/02 17:18:48

        nativize() isn't happy with absolute Mac paths

Affected files ...

.... //depot/macperl/ext/DynaLoader/DynaLoader_pm.PL#5 edit
.... //depot/macperl/lib/ExtUtils/MM_MacOS.pm#6 edit
.... //depot/macperl/lib/lib_pm.PL#5 edit

Differences ...

==== //depot/macperl/ext/DynaLoader/DynaLoader_pm.PL#5 (text) ====
Index: macperl/ext/DynaLoader/DynaLoader_pm.PL
--- macperl/ext/DynaLoader/DynaLoader_pm.PL#4~16929~    Fri May 31 09:27:30 2002
+++ macperl/ext/DynaLoader/DynaLoader_pm.PL     Sun Jun  2 10:18:48 2002
@@ -254,7 +254,7 @@
        my $dir;
        if ($Is_MacOS) {
            my $path = $_;
-           if ($Mac_FS) {
+           if ($Mac_FS && ! -d $path) {
                $path = Mac::FileSpec::Unixish::nativize($path);
            }
            $path .= ":"  unless /:$/;

==== //depot/macperl/lib/ExtUtils/MM_MacOS.pm#6 (text) ====
Index: macperl/lib/ExtUtils/MM_MacOS.pm
--- macperl/lib/ExtUtils/MM_MacOS.pm#5~16938~   Fri May 31 13:46:07 2002
+++ macperl/lib/ExtUtils/MM_MacOS.pm    Sun Jun  2 10:18:48 2002
@@ -242,22 +242,19 @@
 =cut
 
 sub macify {
-    # mmm, better ... and this condition should always be satisified,
-    # as the module is now distributed with MacPerl, but leave in anyway
-    if ($Mac_FS) {
-        return Mac::FileSpec::Unixish::nativize($_[0]);
-    }
-
     my($unix) = @_;
     my(@mac);
 
-    $unix =~ s|^\./||;
-
     foreach (split(/[ \t\n]+/, $unix)) {
        if (m|/|) {
-           $_ = ":$_";
-           s|/|:|g;
-       } 
+           if ($Mac_FS) { # should always be true
+               $_ = Mac::FileSpec::Unixish::nativize($_);
+           } else {
+               s|^\./||;
+               s|/|:|g;
+               $_ = ":$_";
+           }
+       }
        push(@mac, $_);
     }
     

==== //depot/macperl/lib/lib_pm.PL#5 (text) ====
Index: macperl/lib/lib_pm.PL
--- macperl/lib/lib_pm.PL#4~16968~      Sat Jun  1 11:55:49 2002
+++ macperl/lib/lib_pm.PL       Sun Jun  2 10:18:48 2002
@@ -149,7 +149,7 @@
 sub _nativize {
     my($dir) = @_;
 
-    if ($Is_MacOS && $Mac_FS) {
+    if ($Is_MacOS && $Mac_FS && ! -d $dir) {
        $dir = Mac::FileSpec::Unixish::nativize($dir);
        $dir .= ":" unless $dir =~ /:$/;
     }
End of Patch.

Reply via email to