Remove forgotten frame from Storage-method overrides (was missing
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Cursor.pm
index a73eb52..5eefed0 100644 (file)
@@ -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;