GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATA::PAGE::NOTOTALENTRIES (3)

.ds Aq ’

NAME

Data::Page::NoTotalEntries - help when paging through sets of results without total entries

CONTENTS

SYNOPSIS



  use Data::Page::NoTotalEntries;



DESCRIPTION

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.

In sometime, I don’t want to count total entries, because counting total entries from database are very slow.

METHODS

my $pager = Data::Page::NoTotalEntries->new(%args); Create new instance of Data::Page::NoTotalEntries. You can initialize attributes at constructor with %args.
$pager->next_page() 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";
    }



$pager->previous_page() 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";
    }



$pager->prev_page() This is a alias for $pager->previous_page()
$pager->first() This method returns the number of the first entry on the current page.
$pager->last() This method returns the number of the last entry on the current page.

ATTRIBUTES

has_next: Bool Does this page has a next page?
entries_per_page: Int The number of entries in each page.
current_page : Int This attribute is the current page number:
entries_on_this_page: Int This attribute is the number of entries on the current page

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM>

SEE ALSO

Data::Page is a pager component but requires the number of total entries.

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATA::PAGE::NOTOTALENTRIES (3) 2011-02-04

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.