summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL2
-rw-r--r--lib/ExtUtils/MM_MacOS.pm19
-rw-r--r--lib/Test/Harness/t/callback.t2
-rw-r--r--lib/Test/Harness/t/strap-analyze.t2
-rw-r--r--lib/Test/Harness/t/test-harness.t4
-rw-r--r--lib/lib_pm.PL2
6 files changed, 14 insertions, 17 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index 8c44b40907..f442579d29 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -254,7 +254,7 @@ sub bootstrap {
my $dir;
if ($Is_MacOS) {
my $path = $_;
- if ($Mac_FS) {
+ if ($Mac_FS && ! -d $path) {
$path = Mac::FileSpec::Unixish::nativize($path);
}
$path .= ":" unless /:$/;
diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm
index af4a0d6126..71eb96952f 100644
--- a/lib/ExtUtils/MM_MacOS.pm
+++ b/lib/ExtUtils/MM_MacOS.pm
@@ -242,22 +242,19 @@ Translate relative path names into Mac names.
=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, $_);
}
diff --git a/lib/Test/Harness/t/callback.t b/lib/Test/Harness/t/callback.t
index eeea1e4ecd..74b2fe9e2e 100644
--- a/lib/Test/Harness/t/callback.t
+++ b/lib/Test/Harness/t/callback.t
@@ -57,7 +57,7 @@ $SAMPLE_TESTS = VMS::Filespec::unixify($SAMPLE_TESTS) if $^O eq 'VMS';
while( my($test, $expect) = each %samples ) {
local @out = ();
- $strap->analyze_file($^O eq 'macos' ?
+ $strap->analyze_file($^O eq 'MacOS' ?
catfile($SAMPLE_TESTS, $test) :
"$SAMPLE_TESTS/$test");
diff --git a/lib/Test/Harness/t/strap-analyze.t b/lib/Test/Harness/t/strap-analyze.t
index 30d363dfa9..c3e3d1e13b 100644
--- a/lib/Test/Harness/t/strap-analyze.t
+++ b/lib/Test/Harness/t/strap-analyze.t
@@ -466,7 +466,7 @@ while( my($test, $expect) = each %samples ) {
}
my $strap = Test::Harness::Straps->new;
- my %results = $strap->analyze_file($^O eq 'macos' ?
+ my %results = $strap->analyze_file($^O eq 'MacOS' ?
catfile($SAMPLE_TESTS, $test) :
"$SAMPLE_TESTS/$test");
diff --git a/lib/Test/Harness/t/test-harness.t b/lib/Test/Harness/t/test-harness.t
index 3cb0abbb6b..1e9f58ddb5 100644
--- a/lib/Test/Harness/t/test-harness.t
+++ b/lib/Test/Harness/t/test-harness.t
@@ -433,7 +433,7 @@ while (my($test, $expect) = each %samples) {
select NULL; # _run_all_tests() isn't as quiet as it should be.
local $SIG{__WARN__} = sub { $warning .= join '', @_; };
($totals, $failed) =
- Test::Harness::_run_all_tests($^O eq 'macos' ?
+ Test::Harness::_run_all_tests($^O eq 'MacOS' ?
catfile($SAMPLE_TESTS, $test) :
"$SAMPLE_TESTS/$test");
};
@@ -453,7 +453,7 @@ while (my($test, $expect) = each %samples) {
is_deeply( {map { $_=>$totals->{$_} } keys %{$expect->{total}}},
$expect->{total},
"$test - totals" );
- is_deeply( {map { $_=>$failed->{$^O eq 'macos' ?
+ is_deeply( {map { $_=>$failed->{$^O eq 'MacOS' ?
catfile($SAMPLE_TESTS, $test) :
"$SAMPLE_TESTS/$test"}{$_} }
keys %{$expect->{failed}}},
diff --git a/lib/lib_pm.PL b/lib/lib_pm.PL
index 8e949061a0..6c9ab05bc0 100644
--- a/lib/lib_pm.PL
+++ b/lib/lib_pm.PL
@@ -149,7 +149,7 @@ sub _get_dirs {
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 =~ /:$/;
}