d = s;
if (!*s)
break;
- if (!strchr("DIMUdmw", *s))
+ if (!strchr("DIMUdmtw", *s))
Perl_croak(aTHX_ "Illegal switch in PERL5OPT: -%c", *s);
while (++s && *s) {
if (isSPACE(*s)) {
break;
}
}
- moreswitches(d);
+ if (*d == 't') {
+ PL_tainting = TRUE;
+ PL_taint_warn = TRUE;
+ } else {
+ moreswitches(d);
+ }
}
}
}
=item Illegal switch in PERL5OPT: %s
(X) The PERL5OPT environment variable may only be used to set the
-following switches: B<-[DIMUdmw]>.
+following switches: B<-[DIMUdmtw]>.
=item Ill-formed CRTL environ value "%s"
=item PERL5OPT
Command-line options (switches). Switches in this variable are taken
-as if they were on every Perl command line. Only the B<-[DIMUdmw]>
+as if they were on every Perl command line. Only the B<-[DIMUdmtw]>
switches are allowed. When running taint checks (because the program
was running setuid or setgid, or the B<-T> switch was used), this
variable is ignored. If PERL5OPT begins with B<-T>, tainting will be
use Test;
-plan tests => 10;
+plan tests => 11;
my $STDOUT = './results-0';
my $STDERR = './results-1';
my $FAILURE_CODE = 119;
# Run perl with specified environment and arguments returns a list.
-# First element is true iff Perl's stdout and stderr match the
+# First element is true if Perl's stdout and stderr match the
# supplied $stdout and $stderr argument strings exactly.
# second element is an explanation of the failure
sub runperl {
# PERL5OPT Command-line options (switches). Switches in
# this variable are taken as if they were on
-# every Perl command line. Only the -[DIMUdmw]
+# every Perl command line. Only the -[DIMUdmtw]
# switches are allowed. When running taint
# checks (because the program was running setuid
# or setgid, or the -T switch was used), this
'-w -w',
'');
+try({PERL5OPT => '-t'},
+ ['-e', 'print ${^TAINT}'],
+ '1',
+ '');
+
END {
1 while unlink $STDOUT;
1 while unlink $STDERR;