I'm not sure that I understand your query. The resultset has a Data::Page object which has the total number of rows, and should also handle the pagination for you:
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod#Paged_results On 17/06/2011, at 4:03 AM, dorian taylor <[email protected]> wrote: > Hi, > > I'm trying to design a method which, while it paginates the contents > of a query, also knows the full number of records available. > > To keep superfluous parameters down I'd like to just pass in a > ResultSet, but by then the pagination information is baked into the > object's attributes and I'm not sure if there's a way to either modify > it or get it out so that I can run a full count. > > What would you do? > > -- > Dorian Taylor > http://doriantaylor.com/ > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: http://www.grokbase.com/group/[email protected] _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
