provisional MakeMaker patch for VMS
[p5sagit/p5-mst-13.2.git] / perl.c
diff --git a/perl.c b/perl.c
index cd82fe2..50e7aa1 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1099,6 +1099,10 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
                goto reswitch;
            break;
 
+       case 't':
+           PL_taint_warn = TRUE;
+           if (! (PL_dowarn & G_WARN_ALL_MASK))
+               PL_dowarn |= G_WARN_ON;
        case 'T':
            PL_tainting = TRUE;
            s++;
@@ -1295,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)) {
@@ -1308,7 +1312,12 @@ print \"  \\@INC:\\n    @INC\\n\";");
                        break;
                    }
                }
-               moreswitches(d);
+               if (*d == 't') {
+                   PL_tainting = TRUE;
+                   PL_taint_warn = TRUE;
+               } else {
+                   moreswitches(d);
+               }
            }
        }
     }
@@ -2373,6 +2382,11 @@ Perl_moreswitches(pTHX_ char *s)
        PL_doswitches = TRUE;
        s++;
        return s;
+    case 't':
+        if (!PL_tainting)
+            Perl_croak(aTHX_ "Too late for \"-t\" option");
+        s++;
+        return s;
     case 'T':
        if (!PL_tainting)
            Perl_croak(aTHX_ "Too late for \"-T\" option");