[Catalyst] Pager in Catalyst

Jesper Krogh jesper at krogh.cc
Thu Oct 20 15:50:03 CEST 2005


Hi.

I'm, trying to use the "Class::DBI::Plugin::Pager" from catalyst but I
have trouble getting the "where"-clause into the SQL query.

    my $pager = DB::M::DB::Cds->pager(20,1);
    $pager->per_page($c->req->param("size") || 100);
    $pager->page($c->req->param("page") || 1);
    $pager->where( { cdid => [1,2,3,4] } );

The per_page and page works find but the ->where doesn't have any effect

on the pager. It silently drops the where clause, thus returning any
elements in the table.

This is pretty much the same example as in the documentation, so I guess
I've overlooked something fundamental here.


Thanks.
Jesper
-- 
Jesper Krogh




More information about the Catalyst mailing list