X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2Ftestlib%2FMyBase.pm;h=1fc77d0e752ef12ec045d9c0b1fef1702f2c59fc;hb=961d79db;hp=bf55635ee0b6179cbbed87524a86b0421845f5a2;hpb=d7d45bdc6577c020f62cfbf6767431a1c41a351f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/testlib/MyBase.pm b/t/cdbi/testlib/MyBase.pm index bf55635..1fc77d0 100644 --- a/t/cdbi/testlib/MyBase.pm +++ b/t/cdbi/testlib/MyBase.pm @@ -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);