X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=c7f0ec8870243f107a9c7a4461f7f0b2a1880b1f;hb=052b8ce2ec154827133b0b08042487c5617300aa;hp=ed2ab1b63869b4a8fd92c1982c17ad7a7ce4f3dc;hpb=a85b7ebe9762ca64a08468f6c8f27a0ae583d38c;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ed2ab1b..c7f0ec8 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -10,7 +10,6 @@ use mro 'c3'; use Carp::Clan qw/^DBIx::Class|^Try::Tiny/; use DBI; use DBIx::Class::Storage::DBI::Cursor; -use DBIx::Class::Storage::Statistics; use Scalar::Util qw/refaddr weaken reftype blessed/; use Data::Dumper::Concise 'Dumper'; use Sub::Name 'subname'; @@ -171,9 +170,9 @@ sub new { sub _arm_global_destructor { my $self = shift; - my $key = Scalar::Util::refaddr ($self); + my $key = refaddr ($self); $seek_and_destroy{$key} = $self; - Scalar::Util::weaken ($seek_and_destroy{$key}); + weaken ($seek_and_destroy{$key}); } END { @@ -1850,15 +1849,14 @@ sub _dbh_execute_inserts_with_no_binds { } catch { $err = shift; + }; + + # Make sure statement is finished even if there was an exception. + try { + $sth->finish } - finally { - # Make sure statement is finished even if there was an exception. - try { - $sth->finish - } - catch { - $err = shift unless defined $err; - }; + catch { + $err = shift unless defined $err; }; $self->throw_exception($err) if defined $err;