[Catalyst] paging with Data::Page

Ian Sillitoe ian at sillit.com
Sun Jul 26 16:10:41 GMT 2009

Hi Anne,

I don't have my copy of the book in front of me right now. However, either
way your best bet is to cut and paste your actual code so people on the list
can actually see what the problem is (e.g. the complete code of the method
in your controller and the relevant bit of your TT template would probably
be more than enough).

I see that on p.67 it says that 'the pager is a Data::Page object'. I
> don't see 'use Data::Page;' anywhere, nor can I see from perldoc
> Data::Page anything relevant to the code in the book.

My guess here is that you're using a DBIC model and the pager was being
accessed from DBIx::Class::ResultSet object - something like:

  my $rs =3D $c->model( 'YourDBICModel::YourTable' )->search(
      undef, # return all entries from the table
        page =3D> $current_page_number,
        rows  =3D> $entries_per_page,

  my $pager =3D $rs->pager; # isa Data::Page

There's a few different ways of doing this in DBIC though - so this may not
match up to your existing code.


PS. is there any way to search the archives of this mailing list, short
> of downloading the gzip files?

(footer of this email)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090726/58487=

More information about the Catalyst mailing list