[Dbix-class] Pager offset not implemented?
Nigel Metheringham
nigel.metheringham at dev.intechnology.co.uk
Mon Nov 21 18:23:26 CET 2005
On Mon, 2005-11-21 at 17:10 +0000, Matt S Trout wrote:
> It is, it's just misdocumented - page is meant to be the page number :)
>
> Correct usage would be -
>
> my $page = $c->request->param('page') || 1;
> my $items = $class->search({}, { page => $page, rows => 20 });
>
> (offset is designed to get e.g. records 30-50 via { offset => 30, rows => 20 })
That works much better.
Cheers
Nigel.
--
[ Nigel Metheringham Nigel.Metheringham at InTechnology.co.uk ]
[ - Comments in this message are my own and not ITO opinion/policy - ]
More information about the Dbix-class
mailing list