This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not honor TMPDIR for anonymous temporary files when tainting
[perl5.git]
/
t
/
TestInit.pm
diff --git
a/t/TestInit.pm
b/t/TestInit.pm
index
be69c24
..
aa76fe1
100644
(file)
--- a/
t/TestInit.pm
+++ b/
t/TestInit.pm
@@
-1,5
+1,5
@@
# This is a replacement for the old BEGIN preamble which heads (or
# This is a replacement for the old BEGIN preamble which heads (or
-# should head) up every core test program to prep
it for running.
+# should head) up every core test program to prep
are it for running.
# Now instead of:
#
# BEGIN {
# Now instead of:
#
# BEGIN {
@@
-7,14
+7,22
@@
# @INC = '../lib';
# }
#
# @INC = '../lib';
# }
#
-# t/TEST will use -MTestInit.
It also doesn't hurt if you "use TestInit"
-#
(not require) in the test scripts
.
+# t/TEST will use -MTestInit.
You may "use TestInit" in the test
+#
programs but it is not required
.
#
#
-# PS this is not POD because this should be a very minimalist module in
-# case of funaemental perl breakage.
+# P.S. This documentation is not in POD format in order to avoid
+# problems when there are fundamental bugs in perl.
+
+package TestInit;
+
+$VERSION = 1.01;
chdir 't' if -d 't';
@INC = '../lib';
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};
+
$0 =~ s/\.dp$//; # for the test.deparse make target
1;
$0 =~ s/\.dp$//; # for the test.deparse make target
1;