3 package Data::Stream::Bulk::Callback;
6 use namespace::clean -except => 'meta';
8 with qw(Data::Stream::Bulk::DoneFlag) => { excludes => [qw(is_done finished)] };
14 clearer => "finished",
19 my $cb = $self->callback;
23 __PACKAGE__->meta->make_immutable;
33 Data::Stream::Bulk::Callback - Callback based bulk iterator
37 Data::Stream::Bulk::Callback->new(
39 if ( @more_items = get_some() ) {
49 This class provides a callback based implementation of L<Data::Stream::Bulk>.
57 The subroutine that is called when more items are needed.
59 Should return an array reference for the next block, or a false value if there
70 See L<Data::Stream::Bulk::DoneFlag>.
72 Reinvokes C<callback>.