X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FCursor.pm;h=875a3cb1bbc298112f6d49b63c2553e96466895e;hb=3197bdf839b3e826f32cad36074d0eb324661e67;hp=be45ce5a5286b7765214b42e77fb10c0eed7584d;hpb=a3a526ccbf65e59361a29b753f4bdd9495ad6dd5;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Cursor.pm b/lib/DBIx/Class/Storage/DBI/Cursor.pm index be45ce5..875a3cb 100644 --- a/lib/DBIx/Class/Storage/DBI/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/Cursor.pm @@ -3,10 +3,7 @@ package DBIx::Class::Storage::DBI::Cursor; use strict; use warnings; -use base qw/ - Class::Accessor::Grouped - DBIx::Class::Cursor -/; +use base qw/DBIx::Class::Cursor/; __PACKAGE__->mk_group_accessors('simple' => qw/sth/ @@ -127,7 +124,7 @@ sub _dbh_all { my ($storage, $dbh, $self) = @_; $self->_check_dbh_gen; - $self->sth->finish if $self->sth->{Active}; + $self->sth->finish if $self->sth && $self->sth->{Active}; $self->sth(undef); my ($rv, $sth) = $storage->_select(@{$self->{args}}); return @{$sth->fetchall_arrayref}; @@ -155,6 +152,7 @@ sub reset { # No need to care about failures here eval { $self->sth->finish if $self->sth && $self->sth->{Active} }; $self->_soft_reset; + return undef; } sub _soft_reset { @@ -163,7 +161,6 @@ sub _soft_reset { $self->sth(undef); delete $self->{done}; $self->{pos} = 0; - return $self; } sub _check_dbh_gen {