X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2FTestInit.pm;h=15af57a10825e37467cdcfd99e23dd30192e5d99;hb=e447daf9e3940e576dd6b0451030ca27007189d9;hp=b90e150e569e34e24f73be01dc2a2fc0a5b3da32;hpb=c27ac8cc7d43fd5adc00169771cee53f5e586c7d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/TestInit.pm b/t/TestInit.pm index b90e150..15af57a 100644 --- a/t/TestInit.pm +++ b/t/TestInit.pm @@ -7,6 +7,9 @@ # @INC = '../lib'; # } # +# Its primary purpose is to clear @INC so core tests don't pick up +# modules from an installed Perl. +# # t/TEST will use -MTestInit. You may "use TestInit" in the test # programs but it is not required. # @@ -15,9 +18,16 @@ package TestInit; +$VERSION = 1.01; + chdir 't' if -d 't'; @INC = '../lib'; -$ENV{PERL_CORE} = 1; + +# 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;