}
sub DESTROY {
- # None of the reasons this would die matter if we're in DESTROY anyways
if (my $sth = $_[0]->sth) {
- local $SIG{__WARN__} = sub {};
- try { $sth->finish } if $sth->FETCH('Active');
+ # cleanup only core DBI handles, for anything more esoteric we
+ # assume they know how to clean up ater themselves
+ if ($sth->isa('DBI::st')) {
+ local $SIG{__WARN__} = sub {};
+ # None of the reasons this would die matter if we're in DESTROY anyways
+ try { $sth->finish } if $sth->FETCH('Active');
+ }
}
}