Linux SoftwareProgrammingLibrariesData::Page 2.00

Data::Page 2.00


Data::Page is a Perl module that helps when paging through sets of results. SYNOPSIS use Data::Page; my $page = Data::Pa
Developer:   Leon Brocard
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   6K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Data::Page is a Perl module that helps when paging through sets of results.

SYNOPSIS

use Data::Page;

my $page = Data::Page->new();
$page->total_entries($total_entries);
$page->entries_per_page($entries_per_page);
$page->current_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";

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.

For example, say we wished to page through the integers from 1 to 100 with 20 entries per page. The first page would consist of 1-20, the second page from 21-40, the third page from 41-60, the fourth page from 61-80 and the fifth page from 81-100. This module would help you work this out.

Requirements:
  • Perl
    tags page page  current page  entries per  per page  page from  data page  total entries  first page  and the  this module  the number  the first  page through  

    Download Data::Page 2.00


     http://mirrors.evolva.ro/CPAN/authors/id/L/LB/LBROCARD/Data-Page-2.00.tar.gz


    Authors software

    PBS::GraphViz 0.35 (by Leon Brocard)

    Image::WorldMap 0.14 (by Leon Brocard)
    Image::WorldMap is a Perl module to create graphical world maps of data.

    SYNOPSIS

    use Image::WorldMap;
    my $map = Image::Wo

    Data::Page 2.00 (by Leon Brocard)
    Data::Page is a Perl module that helps when paging through sets of results.

    SYNOPSIS

    use Data::Page;

    my $page = Data::Pa

    Template::Plugin::Page 0.10 (by Leon Brocard)
    Template::Plugin::Page is a plugin to help when paging through sets of results.

    SYNOPSIS

    [% USE page = Page($total_entries, $

    MP3::ID3Lib 0.12 (by Leon Brocard)
    MP3::ID3Lib is a Perl module for ID3v1/ID3v2 Tagging of MP3 files.

    SYNOPSIS

    use MP3::ID3Lib;
    my $id3 = MP3::ID3Lib->new($f


    Similar software

    Data::Page 2.00 (by Leon Brocard)
    Data::Page is a Perl module that helps when paging through sets of results.

    SYNOPSIS

    use Data::Page;

    my $page = Data::Pa

    Template::Plugin::Page 0.10 (by Leon Brocard)
    Template::Plugin::Page is a plugin to help when paging through sets of results.

    SYNOPSIS

    [% USE page = Page($total_entries, $

    Template::Plugin::Pagination 0.90 (by Tony Bowden)
    Template::Plugin::Pagination is a plugin to help paginate pages of results.

    SYNOPSIS

    [% USE page = Pagination(items, current_

    Data::Page::Viewport 1.02 (by Ron Savage)
    Data::Page::Viewport is a Perl module to scroll thru data a page, or just an item, at a time.

    Synopsis

    This is a complete, test

    Template::Tutorial 2.15 (by Andy Wardley)
    Template::Tutorial are template toolkit tutorials.

    This section includes tutorials on using the Template Toolkit

    WWW::Patent::Page::Response 0.07 (by Wanda B. Anon)
    WWW::Patent::Page::Response is an object holding a patent page or document (e.g

    Web Secretary 1.9.0 (by Baruch Even)
    Web Secretary is a web page monitoring software

    Page Curl 0.5 (by Federico Mena-Quintero)

    NewTabURL 1.1.3 (by Sogame)

    History links 1.3 (by Vladimir Kudryavtsev)
    This class can be used to keep track of the pages navigated by a user, so it can generate back or next links providing a similar effe


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags