X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FCDBICompat%2FDestroyWarning.pm;h=998bc5d158e2d71af17be3168976d6665ec87253;hb=5e0eea3522876a30453af24097507198bbbc9409;hp=115bf3d5b522128afb702cc08ca534f834301ac5;hpb=c0e7b4e55952cd193b6f1866d0c27ece182397eb;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/CDBICompat/DestroyWarning.pm b/lib/DBIx/Class/CDBICompat/DestroyWarning.pm index 115bf3d..998bc5d 100644 --- a/lib/DBIx/Class/CDBICompat/DestroyWarning.pm +++ b/lib/DBIx/Class/CDBICompat/DestroyWarning.pm @@ -4,7 +4,14 @@ package # hide from PAUSE use strict; use warnings; +use base 'DBIx::Class'; + +use DBIx::Class::_Util 'detected_reinvoked_destructor'; +use namespace::clean; + sub DESTROY { + return if &detected_reinvoked_destructor; + my ($self) = @_; my $class = ref $self; warn "$class $self destroyed without saving changes to "