The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dancer2::Plugin::Paginator - Dancer2 plugin for Paginator::Lite.

VERSION

Version 2.11

SYNOPSIS

    use Dancer2;
    use Dancer2::Plugin::Paginator;

    get '/list' => sub {
        my $paginator = paginator(
            'curr'     => $page,
            'items'    => rset('Post')->count,
            'base_url' => '/posts/page/',
        );

        template 'list', { paginator => $paginator };
    };

    true;

For complete working code, please take a look Dancer2 Cookbook.

CONFIGURATION

Configuration can be done in your Dancer2 app config file as described below:

    plugins:
        Paginator:
            frame_size: 3
            page_size: 7

METHODS

method paginator(%params)

Returns a Paginator::Lite object. Receives same parameters that as the Paginator::Lite constructor.

AUTHOR

Original author Blabos de Blebe, <blabos@cpan.org>

Recently brought to live from BackPAN by Mohammad S Anwar, <mohammad.anwar@yahoo.com>

REPOSITORY

https://github.com/manwar/Dancer2-Plugin-Paginator

ACKNOWLEDGEMENTS

Blabos de Blebe has kindly transferred the ownership of this distribution to me and even handed over the GitHub repository as well.

SEE ALSO

Paginator::Lite

BUGS

Please report any bugs or feature requests to bug-dancer2-plugin-captcha at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer2-Plugin-Captcha. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Dancer2::Plugin::Paginator

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright (C) 2013 Blabos de Blebe. Copyright (C) 2017 - 2019 Mohammad S Anwar.

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