The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
  taint.c AOK

  Insecure %s%s while running with -T switch

__END__
-T
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
chdir $a ;
print "xxx\n" ;
EXPECT
Insecure dependency in chdir while running with -T switch at - line 5.
########
-TU
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
chdir $a;
no warnings 'taint' ;
chdir $a ;
print "xxx\n" ;
use warnings 'taint' ;
chdir $a ;
print "yyy\n" ;
EXPECT
Insecure dependency in chdir while running with -T switch at - line 5.
Insecure dependency in chdir while running with -T switch at - line 10.
xxx
yyy
########
-t
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
chdir $a;
no warnings 'taint' ;
chdir $a ;
print "xxx\n" ;
use warnings 'taint' ;
chdir $a ;
print "yyy\n" ;
EXPECT
Insecure dependency in chdir while running with -t switch at - line 5.
Insecure dependency in chdir while running with -t switch at - line 10.
xxx
yyy