Heya, I'm looking for some naming ideas for the following module
(currently used internally at Emap). I haven't really got any good
ideas: Number::Page, Number::Pager?
NAME
Emap::Page - a module to help when paging through sets of
results
SYNOPSIS
use Emap::Page;
my $page = Emap::Page->new($total_entries, $entries_per_page, $current_page);
print " First page: ", $page->first_page, "\n";
print " Last page: ", $page->last_page, "\n";
print "First entry on page: ", $page->first, "\n";
print " Last entry on page: ", $page->last, "\n";
DESCRIPTION
When searching through large amounts of data, it is often the
case that a result set is returned that is larger than we want
to display on one page. This results in wanting to page through
various pages of data. The maths behind this is unfortunately
fiddly, hence this module.
The main concept is that you pass in the number of total
entries, the number of entries per page, and the current page
number. You can then call methods to find out how many pages of
information there are, and what number the first and last
entries on the current page really are.
Leon
--
Leon Brocard.............................http://www.astray.com/
yapc::Europe............................http://yapc.org/Europe/
... All new improved Brocard, now with Template Toolkit!