test -d /system is a bit too generic test for VOS
[p5sagit/p5-mst-13.2.git] / perl.c
diff --git a/perl.c b/perl.c
index a27620a..50e7aa1 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1099,8 +1099,10 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
                goto reswitch;
            break;
 
-    case 't':
-        PL_taint_warn = TRUE;
+       case 't':
+           PL_taint_warn = TRUE;
+           if (! (PL_dowarn & G_WARN_ALL_MASK))
+               PL_dowarn |= G_WARN_ON;
        case 'T':
            PL_tainting = TRUE;
            s++;
@@ -1297,7 +1299,7 @@ print \"  \\@INC:\\n    @INC\\n\";");
                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)) {
@@ -1310,7 +1312,12 @@ print \"  \\@INC:\\n    @INC\\n\";");
                        break;
                    }
                }
-               moreswitches(d);
+               if (*d == 't') {
+                   PL_tainting = TRUE;
+                   PL_taint_warn = TRUE;
+               } else {
+                   moreswitches(d);
+               }
            }
        }
     }