Ditch Carp::Clan for our own thing
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest.pm
index 7ce9410..46e0918 100644 (file)
@@ -3,7 +3,7 @@ package # hide from PAUSE
 
 use strict;
 use warnings;
-use DBICTest::AuthorCheck;
+use DBICTest::RunMode;
 use DBICTest::Schema;
 use Carp;
 
@@ -78,7 +78,7 @@ sub _database {
     for ($db_file, "${db_file}-journal") {
       next unless -e $_;
       unlink ($_) or carp (
-        "Unable to unlink existing test database file $_ ($!), creation of fresh database / further tests may fail!\n"
+        "Unable to unlink existing test database file $_ ($!), creation of fresh database / further tests may fail!"
       );
     }
 
@@ -112,6 +112,8 @@ sub _database {
 }
 
 sub __mk_disconnect_guard {
+  return if DBICTest::RunMode->peepeeness; # leaks handles, delaying DESTROY, can't work right
+
   my $db_file = shift;
   return unless -f $db_file;