From: Peter Rabbitson Date: Tue, 31 Aug 2010 10:22:45 +0000 (+0200) Subject: Remove forgotten frame from Storage-method overrides (was missing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05b22e331fab6a8c8773eb7bd52cb360ade69180;p=dbsrgits%2FDBIx-Class-Historic.git Remove forgotten frame from Storage-method overrides (was missing a goto in the driver-already-determined shim) Simplify the DBI Cursor DESTROY a little --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 3440ebb..ef02092 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -72,7 +72,6 @@ my @rdbms_specific_methods = qw/ build_datetime_parser datetime_parser_type - insert insert_bulk update @@ -96,7 +95,7 @@ for my $meth (@rdbms_specific_methods) { $_[0]->_determine_driver; goto $_[0]->can($meth); } - $orig->(@_); + goto $orig; }; } diff --git a/lib/DBIx/Class/Storage/DBI/Cursor.pm b/lib/DBIx/Class/Storage/DBI/Cursor.pm index a73eb52..5eefed0 100644 --- a/lib/DBIx/Class/Storage/DBI/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/Cursor.pm @@ -177,11 +177,10 @@ sub _check_dbh_gen { } sub DESTROY { - my ($self) = @_; - # None of the reasons this would die matter if we're in DESTROY anyways - try { $self->sth->finish } - if $self->sth && $self->sth->{Active}; + if (my $sth = $_[0]->sth) { + try { $sth->finish if $sth->{Active} }; + } } 1;