From: Matt S Trout Date: Wed, 8 Mar 2006 18:33:15 +0000 (+0000) Subject: collapse has to be an attr too, bah X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=555af3d91a033d10e1f20c802ded7bf209dd7058;p=dbsrgits%2FDBIx-Class-Historic.git collapse has to be an attr too, bah --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 120aedc..7109e39 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -106,7 +106,7 @@ sub new { if $attrs->{order_by} && !ref($attrs->{order_by}); $attrs->{order_by} ||= []; - my $collapse = {}; + my $collapse = $attrs->{collapse} || {}; if (my $prefetch = delete $attrs->{prefetch}) { my @pre_order; @@ -131,6 +131,8 @@ sub new { push(@{$attrs->{order_by}}, @pre_order); } + $attrs->{collapse} = $collapse; + if ($attrs->{page}) { $attrs->{rows} ||= 10; $attrs->{offset} ||= 0;