X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F54taint.t;h=5db91934f16f3dc334b6155b2c9aaecc0b048664;hb=f91396873406e6e7e6a84148aec41b6027acf897;hp=db350d77e834942fbc17221319b1045e88654dd3;hpb=f54428abf9cc7d7e5604745335694eaf558f6820;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/54taint.t b/t/54taint.t index db350d7..5db9193 100644 --- a/t/54taint.t +++ b/t/54taint.t @@ -6,9 +6,21 @@ use strict; use warnings; +# When in taint mode, PERL5LIB is ignored (but *not* unset) +# Put it back in INC so that local-lib users can actually +# run this test +use Config; +BEGIN { + for (map { defined $ENV{$_} ? $ENV{$_} : () } (qw/PERLLIB PERL5LIB/) ) { # we unshift, so reverse precedence + my ($envvar) = ($_ =~ /^(.*)$/s); # untaint + unshift @INC, map { length($_) ? $_ : () } (split /\Q$Config{path_sep}\E/, $envvar); + } +} + use Test::More; use Test::Exception; use lib qw(t/lib); +use DBICTest; throws_ok ( sub { $ENV{PATH} . (kill (0)) },