Entire test suite now executable under tainted perl (prove -lT)
[dbsrgits/DBIx-Class.git] / t / 52leaks.t
index e36e3e9..61a5d2c 100644 (file)
@@ -422,6 +422,12 @@ assert_empty_weakregistry ($weak_registry);
 # this is ugly and dirty but we do not yet have a Test::Embedded or
 # similar
 
+# set up -I
+require Config;
+$ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC);
+($ENV{PATH}) = $ENV{PATH} =~ /(.+)/;
+
+
 my $persistence_tests = {
   PPerl => {
     cmd => [qw/pperl --prefork=1/, __FILE__],
@@ -446,10 +452,6 @@ SKIP: {
   skip 'Main test failed - skipping persistent env tests', 1
     unless $TB->is_passing;
 
-  # set up -I
-  require Config;
-  local $ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC);
-
   local $ENV{DBICTEST_IN_PERSISTENT_ENV} = 1;
 
   require IPC::Open2;