summaryrefslogtreecommitdiff
path: root/lib/Test/Harness/Straps.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Test/Harness/Straps.pm')
-rw-r--r--lib/Test/Harness/Straps.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm
index d19239fb59..7b018aebd4 100644
--- a/lib/Test/Harness/Straps.pm
+++ b/lib/Test/Harness/Straps.pm
@@ -328,8 +328,11 @@ sub _switches {
# When taint mode is on, PERL5LIB is ignored. So we need to put
# all that on the command line as -Is.
- $s .= join " ", qq[ "-$1"], map {qq["-I$_"]} $self->_filtered_INC
- if $first =~ /^#!.*\bperl.*\s-\w*([Tt]+)/;
+ if ($first =~ /^#!.*\bperl.*\s-\w*([Tt]+)/) {
+ $s .= join " ", qq[ "-$1"], map {qq["-I$_"]} $self->_filtered_INC;
+ } elsif ($^O eq 'MacOS') {
+ $s .= join " ", map {qq["-I$_"]} $self->_filtered_INC;
+ }
close(TEST) or print "can't close $file. $!\n";