DOKK / manpages / debian 12 / libdata-stream-bulk-perl / Data::Stream::Bulk::Callback.3pm.en
Data::Stream::Bulk::Callback(3pm) User Contributed Perl Documentation Data::Stream::Bulk::Callback(3pm)

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

version 0.11

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

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

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.

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

Reinvokes "callback".

Yuval Kogman <nothingmuch@woobling.org>

This software is copyright (c) 2012 by Yuval Kogman.

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

2021-01-01 perl v5.32.0