3 package Data::Stream::Bulk::DoneFlag;
6 use namespace::clean -except => 'meta';
8 with qw(Data::Stream::Bulk);
31 unless ( $self->is_done ) {
32 if ( my $more = $self->get_more ) {
51 Data::Stream::Bulk::DoneFlag - Implement the C<is_done> method in terms of a
56 package Data::Stream::Bulk::Blah;
59 with qw(Data::Stream::Bulk::DoneFlag);
62 if ( my @more = more() ) {
71 This role implements the C<Data::Stream::Bulk> core API in terms of one method
74 As a convenience it calls C<finished> when the stream is exhausted, so that
77 This is used by classes like L<Data::Stream::Bulk::DBI>,
78 L<Data::Stream::Bulk::Callback>.
86 Returns the state of the iterator.
90 As long as the iterator is not yet done, calls C<get_more>.
92 If C<get_more> returned a false value instead of an array reference then
93 C<done> is set, C<finished> is called, and this C<next> does nothing on
98 A noop by default. Can be overridden if so desired.
102 =head1 REQUIRED_METHODS
108 Returns the next block of data as an array ref, or a false value if no items