use base qw/DBIx::Class::Cursor/;
use Try::Tiny;
+use namespace::clean;
__PACKAGE__->mk_group_accessors('simple' =>
- qw/sth/
+ qw/sth storage args pos attrs _dbh_gen/
);
=head1 NAME
my ($self) = @_;
# No need to care about failures here
- try { $self->sth->finish if $self->sth && $self->sth->{Active} };
+ try { $self->sth->finish }
+ if $self->sth && $self->sth->{Active};
$self->_soft_reset;
return undef;
}
}
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->FETCH('Active');
+ }
}
1;