}
#endif
- if (PL_taint_warn && PL_dowarn != G_WARN_ALL_OFF) {
+ if (PL_taint_warn && !(PL_dowarn & (G_WARN_ALL_OFF | G_WARN_ALL_ON | G_WARN_ON))) {
PL_compiling.cop_warnings
= Perl_new_warnings_bitfield(aTHX_ NULL, WARN_TAINTstring, WARNsize);
}
Internet, point your browser at http://www.perl.org/, the Perl Home Page.\n\n");
my_exit(0);
case 'w':
- if (! (PL_dowarn & G_WARN_ALL_MASK))
+ if (! (PL_dowarn & G_WARN_ALL_MASK)) {
PL_dowarn |= G_WARN_ON;
+ if (PL_taint_warn) {
+ if (!specialWARN(PL_compiling.cop_warnings))
+ PerlMemShared_free(PL_compiling.cop_warnings);
+ PL_compiling.cop_warnings = pWARN_STD;
+ }
+ }
s++;
return s;
case 'W':
PL_compiling.cop_warnings = pWARN_ALL ;
else if (PL_dowarn & G_WARN_ALL_OFF)
PL_compiling.cop_warnings = pWARN_NONE ;
- else if (PL_taint_warn) {
+ else if (PL_taint_warn && !(PL_dowarn & G_WARN_ON)) {
PL_compiling.cop_warnings
= Perl_new_warnings_bitfield(aTHX_ NULL, WARN_TAINTstring, WARNsize);
}