summaryrefslogtreecommitdiff
path: root/t/taint.t
blob: 5a7a9903141747681bb3cb30084100b73631dc45 (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
#!perl -w

use Config;

if($^O =~ /vms/i) {
    # $^X isn't VMS-friendly.  I'm disinclined to add a dependency on
    # Probe::Perl just for testing this corner-case
    print "1..0 # skip - can't reliably taint-test on VMS\n";
# } elsif($ENV{PERL5LIB}) {
#     print "1..0 # skip - can't reliably taint-test with PERL5LIB set\n";
# } else {
#     exec("$^X -Tw -Iblib/lib t/realtainttest");
# }
} else {
    my $perl5lib = $ENV{PERL5LIB} || '';
    $ENV{PERL5LIB} = '';
    exec(
        join(' ',
            $Config{perlpath},
            '-Tw',
            (
		# map { "-I$_" }
                map { qq{-I"$_"} }
                grep { -d $_ } # bleh, code-refs getting stringified
                split(/$Config{path_sep}/, $perl5lib)
            ),
            't/realtainttest'
        )
    );
}