d = s;
if (!*s)
break;
- if (!strchr("CDIMUdmtw", *s))
+ if (!strchr("CDIMUdmtwW", *s))
Perl_croak(aTHX_ "Illegal switch in PERL5OPT: -%c", *s);
while (++s && *s) {
if (isSPACE(*s)) {
X<PERL5OPT>
Command-line options (switches). Switches in this variable are taken
-as if they were on every Perl command line. Only the B<-[CDIMUdmtw]>
+as if they were on every Perl command line. Only the B<-[CDIMUdmtwW]>
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
require './test.pl'
}
-plan tests => 75;
+plan tests => 76;
my $STDOUT = tempfile();
my $STDERR = tempfile();
'-1',
'');
+try({PERL5OPT => '-W'},
+ ['-e', 'local $^W = 0; no warnings; print $x'],
+ '',
+ <<ERROR
+Name "main::x" used only once: possible typo at -e line 1.
+Use of uninitialized value \$x in print at -e line 1.
+ERROR
+);
+
try({PERLLIB => "foobar$Config{path_sep}42"},
['-e', 'print grep { $_ eq "foobar" } @INC'],
'foobar',