X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2F54taint.t;h=3ab675ffbd59545a6441513bdf6597efa21e807a;hp=db350d77e834942fbc17221319b1045e88654dd3;hb=9f72d93abcf470e73b310c24d8ce09f8a814b7e5;hpb=fb1a0506f8b70814e503b921fcbc0ba052cd45f7 diff --git a/t/54taint.t b/t/54taint.t index db350d7..3ab675f 100644 --- a/t/54taint.t +++ b/t/54taint.t @@ -6,6 +6,17 @@ 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) = ($_ =~ /^(.+)$/); # untaint + unshift @INC, map { length($_) ? $_ : () } (split /\Q$Config{path_sep}\E/, $envvar); + } +} + use Test::More; use Test::Exception; use lib qw(t/lib);