The Perl Advent Calendar needs more articles for 2022. Submit your idea today!

NAME

DBIx::Skinny::Pager::Page - simple wrapper of Data::Page.

SYNOPSIS

  my $rs = Proj::DB->resultset_with_pager('MySQLFoundRows');
  # ... do something with $rs.
  my ($iter, $pager) = $rs->retrieve;
  # $iter is a DBIx::Skinny::Iterator
  isa_ok($pager, "Data::Page");
  $pager->to_hash # => { 
                  #   total_entries => 70, 
                  #   current_page => 2, 
                  #   entries_per_page => 20, 
                  #   previous_page => 1,
                  #   next_page     => 3,
                  # }

DESCRIPTION

DBIx::Skinny::Pager::Page is a simple wrapper of Data::Page. you can handle it like a Data::Page object.

DBIx::Skinny::Pager's retrieve method return a wrapped DBIx::Skinny::Pager::Page object. It's for distinguish what logic was used from view layer.

AUTHOR

Keiji Yoshimi <walf443 at gmail dot com>

SEE ALSO

+<DBIx::Skinny>, +<DBIx::Skinny::SQL>, +<DBIx::Skinny::Mixin>, +<Data::Page>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.