From: Brandon L. Black Date: Sun, 23 Jul 2006 19:07:58 +0000 (+0000) Subject: better DESTROY handling X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c756145ca658176cddbc489aa45b3eea77291cc5;p=dbsrgits%2FDBIx-Class-Historic.git better DESTROY handling --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 0ded000..a26f157 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1157,7 +1157,13 @@ sub build_datetime_parser { return $type; } -sub DESTROY { shift->_dbh(undef) } +sub DESTROY { + my $self = shift; + return if $self->_dbh; + + $self->_verify_pid; + $self->_dbh(undef); +} 1;