
Data::Page::Set - Print page indexes

use Data::Page;
use Data::Page::Set;
my @data = 0 .. 300;
my $page = Data::Page->new( scalar @data, 5, shift );
my $pageset = Data::Page::Set->new( $page, 6, {} );
print $pageset->show;

$page [Required]A Data::Page object.
$setsize [Required]The size of the pageset: If you have a page object with 20 pages, but you only want to show
<< < 4 5 6 7 8 > >>
Then setsize should be 5 because we're only showing 5 page indexes.
$showhashA hash with zero or more of the following keys, with a coderef as value wich is executed when we are about to print:
link to the first page
no link to the first page
previous page link
no link to the previous
next page link
No next page link
Last page link
No last page link
A link to another page
The current page
Executed in grep { $code->($_) } before the result is joined
Executed and used as the first argument to join

0.02: Previous and next are show when current page not is first and last resp.
0.04: perl-5.6.1 compatible, tests added

Joiner and grepper could be replaced with one routine that constructs the return value.
Data::Page is atm the only pager supported, but we could do better than that.

Berik Visschers <berikv@xs4all.nl>

Copyright 2005 by Berik Visschers <berikv@xs4all.nl>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.