logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Data::Stream::Bulk::Callback - Callback based bulk iterator

Attributes

       callback
           The subroutine that is called when more items are needed.

           Should return an array reference for the next block, or a false value if there is nothing left.

Author

       Yuval Kogman <nothingmuch@woobling.org>

Description

       This class provides a callback based implementation of Data::Stream::Bulk.

Methods

       get_more
           See Data::Stream::Bulk::DoneFlag.

           Reinvokes "callback".

Name

       Data::Stream::Bulk::Callback - Callback based bulk iterator

Synopsis

               Data::Stream::Bulk::Callback->new(
                       callback => sub {
                               if ( @more_items = get_some() ) {
                                       return \@more_items;
                               } else {
                                       return; # done
                               }
                       },
               }

Version

       version 0.11

See Also