Commit | Line | Data |
---|---|---|
6a724e38 AT |
1 | #!./perl -Tw |
2 | # [perl #33173] shellwords.pl and tainting | |
3 | ||
6a724e38 AT |
4 | use Text::ParseWords qw(shellwords old_shellwords); |
5 | use Scalar::Util qw(tainted); | |
6 | ||
7 | print "1..2\n"; | |
8 | ||
9 | print "not " if grep { not tainted($_) } shellwords("$0$^X"); | |
10 | print "ok 1\n"; | |
11 | ||
12 | print "not " if grep { not tainted($_) } old_shellwords("$0$^X"); | |
13 | print "ok 2\n"; |