summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-08-26 18:42:29 +0100
committerNicholas Clark <nick@ccl4.org>2009-08-26 18:42:29 +0100
commite447daf9e3940e576dd6b0451030ca27007189d9 (patch)
treedb4402c0fecfedf9848beb2b7784dd6c5426af01 /t
parent793019c7a82cb5cc23f2539a00b7092ee19100a5 (diff)
downloadperl-e447daf9e3940e576dd6b0451030ca27007189d9.tar.gz
Ensure $ENV{PERL_CORE} is always set, but correctly tainted.
Hopefully a better solution than a19106168e3a7e2a. (change 19964)
Diffstat (limited to 't')
-rw-r--r--t/TestInit.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/TestInit.pm b/t/TestInit.pm
index 09097ef759..15af57a108 100644
--- a/t/TestInit.pm
+++ b/t/TestInit.pm
@@ -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;