Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Data::Page::NoTotalEntUser(Contributed Perl DocumData::Page::NoTotalEntries(3)

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

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.

perl v5.24.1			  2011-02-04	 Data::Page::NoTotalEntries(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | ATTRIBUTES | AUTHOR | SEE ALSO | LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Data::Page::NoTotalEntries&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help