diff options
Diffstat (limited to 'lib/Test/Harness.pm')
-rw-r--r-- | lib/Test/Harness.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index ddf80c953f..ec2c49e559 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -53,7 +53,7 @@ sub runtests { my $old5lib = $ENV{PERL5LIB}; local($ENV{'PERL5LIB'}) = join($Config{path_sep}, @INC); - if ($Is_VMS) { $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g } + if ($^O eq 'VMS') { $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g } my $t_start = new Benchmark; while ($test = shift(@tests)) { @@ -61,8 +61,9 @@ sub runtests { chop($te); print "$te" . '.' x (20 - length($te)); my $fh = new FileHandle; - if ($^O eq 'VMS') { $fh->open("MCR $^X $switches $test|") || (print "can't run. $!\n"); } - else { $fh->open("$^X $switches $test|") || (print "can't run. $!\n"); } + my $cmd = "$^X $switches $test|"; + $cmd = "MCR $cmd" if $^O eq 'VMS'; + $fh->open($cmd) or print "can't run. $!\n"; $ok = $next = $max = 0; @failed = (); while (<$fh>) { |