blob: c38cf1a0d9ed5c8d80947714f9ed5322913c0d70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!./perl -T
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
use lib qw(blib/lib blib/arch);
use Scalar::Util qw(tainted);
use Config;
print "1..5\n";
print "not " if tainted(1);
print "ok 1\n";
my $var = 2;
print "not " if tainted($var);
print "ok 2\n";
my $key = (keys %ENV)[0];
$var = $ENV{$key};
print "not " unless tainted($var);
print "ok 3\n";
print "not " unless tainted($ENV{$key});
print "ok 4\n";
print "not " if @ARGV and not tainted($ARGV[0]);
print "ok 5\n";
|