From: Peter Rabbitson Date: Sat, 2 Oct 2010 13:25:00 +0000 (+0200) Subject: Delay construction of try block until an active $sth is asserted X-Git-Tag: v0.08124~60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a359de728e5e749aaf3d550fceb023b808456340;p=dbsrgits%2FDBIx-Class.git Delay construction of try block until an active $sth is asserted --- diff --git a/lib/DBIx/Class/Storage/DBI/Cursor.pm b/lib/DBIx/Class/Storage/DBI/Cursor.pm index 5eefed0..75b1136 100644 --- a/lib/DBIx/Class/Storage/DBI/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/Cursor.pm @@ -179,7 +179,7 @@ sub _check_dbh_gen { sub DESTROY { # None of the reasons this would die matter if we're in DESTROY anyways if (my $sth = $_[0]->sth) { - try { $sth->finish if $sth->{Active} }; + try { $sth->finish } if $sth->{Active}; } }