Nicolas Steenlant > Catmandu-0.9301 > Catmandu::Paged

Download:
Catmandu-0.9301.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Catmandu::Paged - Adds page calculation to a package

SYNOPSIS ^

    package MyPackage;

    use Moo;

    with 'Catmandu::Paged';

    sub start {
        12; # Starting result
    }

    sub limit  {
        10; # Number of results per page
    }

    sub total {
        131237128371; # Total number of results;
    }

    package main;

    my $x = MyPackage->new;

    $x->first_page;
    $x->last_page;
    $x->page_size;
    $x->page; # current page
    $x->previous_page;
    $x->next_page;
    $x->first_on_page;
    $x->next;
    $x->page_ranges;
    $x->pages_in_spread;

SEE ALSO ^

Catmandu::Hits

syntax highlighting: