X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FCursor.pm;h=5800113d7e0b4e1289397d6e1688d39052c86e96;hb=43919f423fba30ae065ba4617a2e1f9e5aae1640;hp=6a29f46fa1b6f6970538f10da3aba6878d9b25ac;hpb=658fa250be6ed1944d042ccf985d5c05d41111f6;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/Cursor.pm b/lib/DBIx/Class/Storage/DBI/Cursor.pm index 6a29f46..5800113 100644 --- a/lib/DBIx/Class/Storage/DBI/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/Cursor.pm @@ -36,8 +36,8 @@ Returns a new L object. sub new { my ($class, $storage, $args, $attrs) = @_; - #use Data::Dumper; warn Dumper(@_); $class = ref $class if ref $class; + my $new = { storage => $storage, args => $args, @@ -55,7 +55,7 @@ sub new { =item Arguments: none -=item Return Value: [ $sql, @bind ] +=item Return Value: \[ $sql, @bind ] =back @@ -72,7 +72,7 @@ sub as_query { my @args = $storage->_select_args(@{$self->{args}}); my ($sql, $bind) = $storage->_prep_for_execute(@args[0 .. 2], [@args[4 .. $#args]]); - return [ $sql, @$bind ]; + return \[ "($sql)", @{ $bind || [] }]; } =head2 next @@ -152,7 +152,7 @@ sub all { my ($self) = @_; if ($self->{attrs}{software_limit} && ($self->{attrs}{offset} || $self->{attrs}{rows})) { - return $self->SUPER::all; + return $self->next::method; } $self->{storage}->dbh_do($self->can('_dbh_all'), $self); }