X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage.pm;h=dfff9a1a499e4776c328aa318da4bd9471794b01;hb=6c5aa1fbffdc9e5679d2f68780b11a9569ec1993;hp=acae96a5621347e5215742de8689d6b8e079e30d;hpb=b78ed1e42494c2d9afc81d24cc9b67563fe135e0;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage.pm b/lib/DBIx/Class/Storage.pm index acae96a..dfff9a1 100644 --- a/lib/DBIx/Class/Storage.pm +++ b/lib/DBIx/Class/Storage.pm @@ -16,8 +16,7 @@ use DBIx::Class::Carp; use DBIx::Class::Storage::BlockRunner; use Scalar::Util qw/blessed weaken/; use DBIx::Class::Storage::TxnScopeGuard; -use DBIx::Class::_Util qw( dbic_internal_try fail_on_internal_call ); -use Try::Tiny; +use DBIx::Class::_Util qw( dbic_internal_try dbic_internal_catch fail_on_internal_call ); use namespace::clean; __PACKAGE__->mk_group_accessors(simple => qw/debug schema transaction_depth auto_savepoint savepoints/); @@ -152,7 +151,7 @@ For example, my $rs; try { $rs = $schema->txn_do($coderef); - } catch { + } dbic_internal_catch { my $error = shift; # Transaction failed die "something terrible has happened!" @@ -320,7 +319,7 @@ sub __delicate_rollback { dbic_internal_try { $self->txn_rollback; 1 } - catch { + dbic_internal_catch { $rbe = $_; @@ -590,7 +589,7 @@ sub debugobj { my $cfg = dbic_internal_try { Config::Any->load_files({ files => [$profile], use_ext => 1 }); - } catch { + } dbic_internal_catch { # sanitize the error message a bit $_ =~ s/at \s+ .+ Storage\.pm \s line \s \d+ $//x; $self->throw_exception("Failure processing \$ENV{DBIC_TRACE_PROFILE}: $_"); @@ -616,7 +615,7 @@ sub debugobj { # a better fix. This is another yak to shave... :( dbic_internal_try { DBIx::Class::Storage::Debug::PrettyPrint->new(@pp_args); - } catch { + } dbic_internal_catch { $self->throw_exception($_); } }