X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FBlockRunner.pm;h=8dae0c9be71dd4d9f8fdfa21e7609044712f94dd;hb=8e40a627f9c94df8ae46c1c1abc6f7abdb3fdfdf;hp=05fe47574ed5736600420da38449cda620f913ea;hpb=7d534e689b7f9820dda4272bf6702fc3e9e86f0d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/BlockRunner.pm b/lib/DBIx/Class/Storage/BlockRunner.pm index 05fe475..8dae0c9 100644 --- a/lib/DBIx/Class/Storage/BlockRunner.pm +++ b/lib/DBIx/Class/Storage/BlockRunner.pm @@ -1,13 +1,21 @@ package # hide from pause until we figure it all out DBIx::Class::Storage::BlockRunner; -use Sub::Quote 'quote_sub'; +use strict; + use DBIx::Class::Exception; use DBIx::Class::Carp; use Context::Preserve 'preserve_context'; +use DBIx::Class::_Util 'is_exception'; use Scalar::Util qw(weaken blessed reftype); use Try::Tiny; -use Moo; + +# DO NOT edit away without talking to riba first, he will just put it back +BEGIN { + local $ENV{PERL_STRICTURES_EXTRA} = 0; + require Moo; Moo->import; + require Sub::Quote; Sub::Quote->import('quote_sub'); +} use warnings NONFATAL => 'all'; use namespace::clean; @@ -154,7 +162,7 @@ sub _run { } # something above threw an error (could be the begin, the code or the commit) - if ($run_err ne '') { + if ( is_exception $run_err ) { # attempt a rollback if we did begin in the first place if ($txn_begin_ok) {