Further delay empty weakregistry assertions
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / MyBase.pm
index bf55635..1fc77d0 100644 (file)
@@ -40,7 +40,10 @@ my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintErr
 $dbh = DBI->connect(@connect) or die DBI->errstr;
 my @table;
 
-END { $dbh->do("DROP TABLE $_") foreach @table }
+END {
+  $dbh->do("DROP TABLE $_") for @table;
+  undef $dbh;
+}
 
 __PACKAGE__->connection(@connect);