Data::Page::NoTotalEntries - help when paging through sets of results without total entries
use Data::Page::NoTotalEntries;
Data::Page::NoTotalEntries is a generic pager object, so it's very similar with Data::Page. But so Data::Page::NoTotalEntries doesn't support $pager->total_entries and other some methods.
$pager->total_entries
In sometime, I don't want to count total entries, because counting total entries from database are very slow.
Create new instance of Data::Page::NoTotalEntries. You can initialize attributes at constructor with %args.
%args
This method returns the next page number, if one exists. Otherwise it returns undefined:
if ($page->next_page) { print "Next page number: ", $page->next_page, "\n"; }
This method returns the previous page number, if one exists. Otherwise it returns undefined:
if ($page->previous_page) { print "Previous page number: ", $page->previous_page, "\n"; }
This is a alias for $pager->previous_page()
$pager->previous_page()
This method returns the number of the first entry on the current page.
This method returns the number of the last entry on the current page.
Does this page has a next page?
The number of entries in each page.
This attribute is the current page number:
This attribute is the number of entries on the current page
Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM>
Data::Page is a pager component but requires the number of total entries.
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::Page::NoTotalEntries, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Page::NoTotalEntries
CPAN shell
perl -MCPAN -e shell install Data::Page::NoTotalEntries
For more information on module installation, please visit the detailed CPAN module installation guide.