Back out constructor/prefetch rewrite introduced mainly by 43245ada4a
[dbsrgits/DBIx-Class.git] / t / 52leaks.t
index 796453b..eb72a82 100644 (file)
@@ -79,6 +79,10 @@ unless (DBICTest::RunMode->is_plain) {
       }
     );
 
+    # unicode is tricky, and now we happen to invoke it early via a
+    # regex in connection()
+    return $obj if (ref $obj) =~ /^utf8/;
+
     # Test Builder is now making a new object for every pass/fail (que bloat?)
     # and as such we can't really store any of its objects (since it will
     # re-populate the registry while checking it, ewwww!)
@@ -107,6 +111,7 @@ unless (DBICTest::RunMode->is_plain) {
   require DBI;
   require DBD::SQLite;
   require FileHandle;
+  require Moo;
 
   %$weak_registry = ();
 }
@@ -418,6 +423,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__],
@@ -442,10 +453,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;