NAME

Template::Flute::Pager - Data::Page class for Template::Flute

SYNOPSIS

$pager = Template::Flute::Pager->new;

# set page size
$pager->page_size(10);

# retrieve number of pages
$pager->pages;

# retrieve current page (numering starts at 1)
$pager->current_page;

# retrieve global position numbers for current page
$pager->position_first;
$pager->position_last;

# select a page (numbering starts at 1)
$pager->select_page(5);

ATTRIBUTES

iterator

Pager iterator.

page_size

Page size (defaults to 0).

page_position

Page position (defaults to 0).

METHODS

pages

Returns number of pages.

current_page

Returns current page, starting from 1.

select_page {

Select page. Page numbering starts at 1.

position_first

Returns global position number of first item on current page.

position_last

Returns global position number of last item on current page.

next

Returns next record or undef.

count

Returns number of records.

reset

Resets iterator.

seed

Seeds the iterator.

AUTHOR

Stefan Hornburg (Racke), <racke@linuxia.de>

LICENSE AND COPYRIGHT

Copyright 2010-2016 Stefan Hornburg (Racke) <racke@linuxia.de>.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

SEE ALSO

Template::Flute::Iterator