X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FData%2FStream%2FSTH.pm;h=eb504ef82ce6a822a637405667a1ebe5f56b92d4;hb=3347c67ee317a36b62bc02d2c6db2b9d06bc99c3;hp=7a5e1629a4549cccf1fefa0905726a3db8bf1270;hpb=65b769607d2a56a9b5c966f6773a7fc208e971cb;p=dbsrgits%2FDBIx-Data-Store-old.git diff --git a/lib/DBIx/Data/Stream/STH.pm b/lib/DBIx/Data/Stream/STH.pm index 7a5e162..eb504ef 100644 --- a/lib/DBIx/Data/Stream/STH.pm +++ b/lib/DBIx/Data/Stream/STH.pm @@ -5,12 +5,15 @@ use Method::Signatures::Simple; has 'sth' => (is => 'ro', required => 1, clearer => '_clear_sth'); +has '_column_order' => (is => 'ro', required => 1, init_arg => 'column_order'); + method next { my $sth = $self->sth; return unless $sth; # {Active} only means that there *may* be more results to fetch if ($sth->{Active} and my @next = $self->sth->fetchrow_array) { - return \@next; + my %next; @next{@{$self->_column_order}} = @next; + return \%next; } $sth->finish; # prepare_cached might recycle it now we're finished so get rid of it