Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

GitLab::API::v4::Paginator

Name GitLab::API::v4::Paginator
Version 0.26
Located at /usr/share/perl5
File /usr/share/perl5/GitLab/API/v4/Paginator.pm
Is Core No
Search CPAN for this module GitLab::API::v4::Paginator
Documentation GitLab::API::v4::Paginator
Module Details GitLab::API::v4::Paginator


NAME

GitLab::API::v4::Paginator - Iterate through paginated GitLab v4 API records.


DESCRIPTION

There should be no need to create objects of this type directly, instead use paginator in the GitLab::API::v4 manpage which simplifies things a bit.


REQUIRED ARGUMENTS

method

The name of the method subroutine to call on the api object to get records from.

This method must accept a hash ref of parameters as the last argument, adhere to the page and per_page parameters, and return an array ref.

api

The the GitLab::API::v4 manpage object.


OPTIONAL ARGUMENTS

args

The arguments to use when calling the method, the same arguments you would use when you call the method yourself on the api object, minus the \%params hash ref.

params

The \%params hash ref argument.


METHODS

next_page

    while (my $records = $paginator->next_page()) { ... }

Returns an array ref of records for the next page.

next

    while (my $record = $paginator->next()) { ... }

Returns the next record in the current page. If all records have been exhausted then next_page will automatically be called. This way if you want to ignore pagination you can just call next over and over again to walk through all the records.

all

    my $records = $paginator->all();

This is just an alias for calling next_page over and over again to build an array ref of all records.

reset

    $paginator->reset();

Reset the paginator back to its original state on the first page with no records retrieved yet.


SUPPORT

See SUPPORT in the GitLab::API::v4 manpage.


AUTHORS

See AUTHORS in the GitLab::API::v4 manpage.


COPYRIGHT AND LICENSE

See COPYRIGHT AND LICENSE in the GitLab::API::v4 manpage.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026