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

[PATCH t/comp/script.t] Elimininating needless logic, runs from t/ now

Thread Next
From:
Michael G Schwern
Date:
December 6, 2001 12:22
Subject:
[PATCH t/comp/script.t] Elimininating needless logic, runs from t/ now
Message ID:
20011206202222.GG16414@blackrider
This wouldn't run from the t/ directory on VMS since there's no
'./perl' there.  Instead, we strip all that logic and just use $^X.


--- t/comp/script.t	2001/12/06 20:18:55	1.1
+++ t/comp/script.t	2001/12/06 20:19:45
@@ -1,13 +1,8 @@
 #!./perl
 
-# $RCSfile: script.t,v $$Revision: 1.1 $$Date: 2001/12/06 20:18:55 $
-
 print "1..3\n";
 
-$PERL = ($^O eq 'MSWin32') ? '.\perl'
-        : (($^O eq 'NetWare') ? 'perl'
-           : ($^O eq 'MacOS') ? $^X : './perl');
-$x = `$PERL -le "print 'ok';"`;
+$x = `$^X -le "print 'ok';"`;
 
 if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
 
@@ -15,11 +10,11 @@
 print try 'print "ok\n";'; print try "\n";
 close try;
 
-$x = `$PERL Comp.script`;
+$x = `$^X Comp.script`;
 
 if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
 
-$x = `$PERL <Comp.script`;
+$x = `$^X <Comp.script`;
 
 if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}
 

-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
Procrastination
What is a paste enema?
Procrastination
	-- obscurite

Thread Next


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