DBIx::Class::ResultSet::Data::Pageset - Get a Data::Pageset pager from a resultset
# in your resultsource class __PACKAGE__->resultset_class( 'DBIx::Class::ResultSet::Data::Pageset' ); # in your calling code my $rs = $schema->resultset('Foo')->search( { }, { pages_per_set => 5 } ); my $pager = $rs->pageset; # sliding pager my $rs2 = $schema->resultset('Foo')->search( { }, { pageset_mode => 'slide' } );
This is a simple way to allow you to get a Data::Pageset object for paging rather than the standard Data::Page object.
perl Makefile.PL make make test make install
Returns a Data::Pageset object for paging. This will grab the pages_per_set option (default: 10) and the pageset_mode option (default: fixed) from the resultset attributes.
pages_per_set
10
pageset_mode
fixed
Brian Cassidy <bricas@cpan.org>
Copyright 2007-2009 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DBIx::Class
Data::Pageset
To install DBIx::Class::ResultSet::Data::Pageset, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::ResultSet::Data::Pageset
CPAN shell
perl -MCPAN -e shell install DBIx::Class::ResultSet::Data::Pageset
For more information on module installation, please visit the detailed CPAN module installation guide.