Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Data::SpreadPagination 0.1.2

    Download button

    No screenshots available
    Downloads: 314  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jody Belka | More programs
    Perl Artistic License / FREE
    July 19th, 2007, 20:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Data::SpreadPagination description

    A Perl module for page numbering and spread pagination.

    Data::SpreadPagination is a Perl module for page numbering and spread pagination.

    SYNOPSIS

    use Data::SpreadPagination;
    my $pageInfo = Data::SpreadPagination->new({
    totalEntries => $totalEntries,
    entriesPerPage => $entriesPerPage,
    # Optional, will use defaults otherwise.
    # only 1 of currentPage / startEntry can be provided.
    currentPage => $currentPage,
    startEntry => $startEntry,
    maxPages => $maxPages,
    });

    # General page information
    print " First page: ", $pageInfo->first_page, "n";
    print " Last page: ", $pageInfo->last_page, "n";
    print " Next page: ", $pageInfo->next_page, "n";
    print " Previous page: ", $pageInfo->previous_page, "n";

    # Results on current page
    print "First entry on page: ", $pageInfo->first, "n";
    print " Last entry on page: ", $pageInfo->last, "n";

    # Page range information
    my $pageRanges = $pageInfo->page_ranges;

    # Print out the page spread
    foreach my $page ($pageInfo->pages_in_spread()) {
    if (!defined $page) {
    print "... ";
    } elsif ($page == $pageInfo->current_page) {
    print "$page ";
    } else {
    print "$page ";
    }
    }


    The object produced by Data::SpreadPagination can be used to create a spread pagination navigator. It inherits from Data::Page, and has access to all of the methods from this object.

    In addition, it also provides methods for creating a pagination spread, to allow for keeping the number of pagenumbers displayed within a sensible limit, but at the same time allowing easy navigation.

    The object can easily be passed to a templating system such as Template Toolkit or be used within a script.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    page numbering | spread pagination | Perl module | Data::SpreadPaginati | page | numbering

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM