Catmandu::Paged - Adds page calculation to a package
package MyPackage; use Moo; with 'Catmandu::Paged'; sub start { 12; # Starting result } sub limit { 10; # Number of results per page } sub total { 131237128371; # Total number of results; } package main; my $x = MyPackage->new; $x->first_page; $x->last_page; $x->page_size; $x->page; # current page $x->previous_page; $x->next_page; $x->first_on_page; $x->next; $x->page_ranges; $x->pages_in_spread;
Catmandu::Hits
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.