Ensure $ENV{PERL_CORE} is always set, but correctly tainted.
[p5sagit/p5-mst-13.2.git] / t / TestInit.pm
index 09097ef..15af57a 100644 (file)
@@ -23,8 +23,10 @@ $VERSION = 1.01;
 chdir 't' if -d 't';
 @INC = '../lib';
 
-# Don't interfere with the taintedness of %ENV, this could perturbate tests
-$ENV{PERL_CORE} = 1 unless ${^TAINT};
+# Don't interfere with the taintedness of %ENV, this could perturbate tests.
+# This feels like a better solution than the original, from
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-07/msg00154.html
+$ENV{PERL_CORE} = $^X;
 
 $0 =~ s/\.dp$//; # for the test.deparse make target
 1;