Make Data::Page total count evaluation lazy
authorPeter Rabbitson <ribasushi@cpan.org>
Mon, 27 Sep 2010 07:27:39 +0000 (09:27 +0200)
committerPeter Rabbitson <ribasushi@cpan.org>
Mon, 4 Oct 2010 13:59:13 +0000 (15:59 +0200)
commit652452208e616becca6cfd0f16956339410da6d0
tree4e187ad53a15d7293eec2b20826d20dc9b0fdfff
parenta8c2c746a5bb98671cbe3a58f26cd115b7770cf9
Make Data::Page total count evaluation lazy

The short version is - now you can do $rs->pager->total_entries($satanic_num)
and DBIC will never even try to fire a COUNT query

This may seem to be a *lot* of code to do something that could
be done with a trivial subclass. However keep in mind that this
is a proof-of-concept of what do we do when we can *not* (or do
not want to) subclass.
Changes
Makefile.PL
lib/DBIx/Class/ResultSet.pm
t/67pager.t