diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-12 07:38:16 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-12 07:38:16 +0000 |
commit | 74288ac80044d4682050dc85f8309429977cc884 (patch) | |
tree | 5debc814cf6c36734f29872af73d9058ff9e5e61 /perl.c | |
parent | 35cd451c5a1303394968903750cc3b3a1a6bc892 (diff) | |
download | perl-74288ac80044d4682050dc85f8309429977cc884.tar.gz |
PERL5OPT=-T enables taint mode (suggested by Jason Riedy <ejr@cise.ufl.edu>)
p4raw-id: //depot/perl@2880
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -891,19 +891,25 @@ print \" \\@INC:\\n @INC\\n\";"); switch_end: if (!PL_tainting && (s = PerlEnv_getenv("PERL5OPT"))) { - while (s && *s) { - while (isSPACE(*s)) - s++; - if (*s == '-') { - s++; - if (isSPACE(*s)) - continue; + while (isSPACE(*s)) + s++; + if (*s == '-' && *(s+1) == 'T') + PL_tainting = TRUE; + else { + while (s && *s) { + while (isSPACE(*s)) + s++; + if (*s == '-') { + s++; + if (isSPACE(*s)) + continue; + } + if (!*s) + break; + if (!strchr("DIMUdmw", *s)) + croak("Illegal switch in PERL5OPT: -%c", *s); + s = moreswitches(s); } - if (!*s) - break; - if (!strchr("DIMUdmw", *s)) - croak("Illegal switch in PERL5OPT: -%c", *s); - s = moreswitches(s); } } |