File: untaint.t

package info (click to toggle)
libdata-formvalidator-perl 4.66-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 588 kB
  • ctags: 127
  • sloc: perl: 2,756; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# A gift from Andy Lester, this trick shows me where eval's die. 
use Carp;
$SIG{__WARN__} = \&carp;
$SIG{__DIE__} = \&confess;

use Config;

my @args = ('-I./lib',
    ( (defined($ENV{PERL5LIB}) && length($ENV{PERL5LIB}))
        ?(map { "-I$_" } split(/$Config{path_sep}/, $ENV{PERL5LIB}))
        : ()
    ),
    '-T',
    './t/untaint.pl',
    qw(Jim Beam jim@foo.bar james@bar.foo 132.10.10.2 Monroe Rufus 12345 oops 0)
);

# We use $^X to make it easier to test with different versions of Perl. 
system($^X, @args);