יובל קוג'מן (Yuval Kogman) > Data-Stream-Bulk-0.07 > Data::Stream::Bulk::Callback

Download:
Data-Stream-Bulk-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source   Latest Release: Data-Stream-Bulk-0.11

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
                        }
                },
        }

DESCRIPTION ^

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

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.

METHODS ^

get_more

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

Reinvokes callback.

syntax highlighting: