X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FCursor.pm;h=426f72eaba8b5322df1a2a7d00619716420bbc26;hb=c4d3fae2d68b67050e6f4a04031608506e9a18e8;hp=c9dedf652d127640448d4dd1301fcb6ede29ed3c;hpb=dbaee7482fe6ff190e8ae53d609d0294b911339b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Cursor.pm b/lib/DBIx/Class/Storage/DBI/Cursor.pm index c9dedf6..426f72e 100644 --- a/lib/DBIx/Class/Storage/DBI/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/Cursor.pm @@ -59,7 +59,8 @@ sub new { =back -Advances the cursor to the next row and returns an arrayref of column values. +Advances the cursor to the next row and returns an array of column +values (the result of L method). =cut @@ -123,7 +124,10 @@ sub _dbh_all { sub all { my ($self) = @_; - return $self->SUPER::all if $self->{attrs}{rows}; + if ($self->{attrs}{software_limit} + && ($self->{attrs}{offset} || $self->{attrs}{rows})) { + return $self->SUPER::all; + } $self->{storage}->dbh_do($self->can('_dbh_all'), $self); } @@ -163,6 +167,7 @@ sub DESTROY { my ($self) = @_; # None of the reasons this would die matter if we're in DESTROY anyways + local $@; eval { $self->{sth}->finish if $self->{sth} && $self->{sth}->{Active} }; }