X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FTxnScopeGuard.pm;h=5b72f68c5a06e7229738351810fe5b665e6a53c0;hb=90d7422fc60a3bad71cc67dc20106ef68046664e;hp=d5291fafa52822e2b208983b80d0266c73c8bd9d;hpb=eb7aa96091132ffd9f6256d2ff3d341102b60003;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/TxnScopeGuard.pm b/lib/DBIx/Class/Storage/TxnScopeGuard.pm index d5291fa..5b72f68 100644 --- a/lib/DBIx/Class/Storage/TxnScopeGuard.pm +++ b/lib/DBIx/Class/Storage/TxnScopeGuard.pm @@ -122,7 +122,11 @@ sub DESTROY { try { $storage->_seems_connected && $storage->txn_rollback } catch { $rollback_exception = shift }; - if (defined $rollback_exception && $rollback_exception !~ /DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION/) { + if ( $rollback_exception and ( + ! defined blessed $rollback_exception + or + ! $rollback_exception->isa('DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION') + ) ) { # append our text - THIS IS A TEMPORARY FIXUP! # a real stackable exception object is in the works if (ref $exception eq 'DBIx::Class::Exception') {