X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=2cc0219b19c56ee4b8f584022f3350a666bbfce8;hp=38483878b28afa6ba946e457516c590c9a642a60;hb=a458e9e3a522099867e27e4c84cd94ca37e1355b;hpb=c3e9f7189094e94137356251c4f0b1f1cbfeb04a diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 3848387..2cc0219 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -187,17 +187,8 @@ sub new { sub DESTROY { my $self = shift; - # destroy just the object if not native to this process/thread - $self->_preserve_foreign_dbh; - - # some databases need this to stop spewing warnings - if (my $dbh = $self->_dbh) { - try { - %{ $dbh->{CachedKids} } = (); - $dbh->disconnect; - }; - } - + # some databases spew warnings on implicit disconnect + local $SIG{__WARN__} = sub {}; $self->_dbh(undef); }