DBIx::Class::ResultSet::Data::Pageset - Get a Data::Pageset pager from a resultset


DBIx-Class-ResultSet-Data-Pageset documentation  | view source Contained in the DBIx-Class-ResultSet-Data-Pageset distribution.

Index


NAME

Top

DBIx::Class::ResultSet::Data::Pageset - Get a Data::Pageset pager from a resultset

SYNOPSIS

Top

    # 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' } );

DESCRIPTION

Top

This is a simple way to allow you to get a Data::Pageset object for paging rather than the standard Data::Page object.

INSTALLATION

Top

    perl Makefile.PL
    make
    make test
    make install

METHODS

Top

pageset( )

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.

AUTHOR

Top

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Top

SEE ALSO

Top

* DBIx::Class
* Data::Pageset

DBIx-Class-ResultSet-Data-Pageset documentation  | view source Contained in the DBIx-Class-ResultSet-Data-Pageset distribution.