develooper Front page | perl.vmsperl | Postings from December 2001

[PATCH t/run/kill_perl.t] Eliminationg needless $^X logic

From:
Michael G Schwern
Date:
December 6, 2001 12:31
Subject:
[PATCH t/run/kill_perl.t] Eliminationg needless $^X logic
Message ID:
20011206203158.GI16414@blackrider
Again, VMS was resulting in trying to run `./perl ...` in t/ and
causing the test to vomit.  So we strip most of the logic and just use
$^X.

I think these problems are showing up because I haven't run 'mmk test'
yet, thus there's no perl in t/ so its going off and finding the old
5.005_03 that's installed elsewhere.


--- t/run/kill_perl.t	2001/12/06 20:23:34	1.1
+++ t/run/kill_perl.t	2001/12/06 20:24:14
@@ -69,17 +69,11 @@
     close TEST or die "Cannot close $tmpfile: $!";
 
     my $results;
-    if ($^O eq 'MSWin32') {
-        $results = `.\\perl -I../lib $switch $tmpfile 2>&1`;
-    }
-    elsif ($^O eq 'NetWare') {
-        $results = `perl -I../lib $switch $tmpfile 2>&1`;
-    }
-    elsif ($^O eq 'MacOS') {
-	$results = `$^X -I::lib -MMac::err=unix $switch $tmpfile`;
+    if ($^O eq 'MacOS') {
+        $results = `$^X -I::lib -MMac::err=unix $switch $tmpfile`;
     }
     else {
-      $results = `./perl "-I../lib" $switch $tmpfile 2>&1`;
+        $results = `$^X "-I../lib" $switch $tmpfile 2>&1`;
     }
     my $status = $?;
 

-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
Schwern Unit:  a positive but insignificant quantity



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About