Data::Stream::Bulk::Callback.3pm

Langue: en

Autres versions - même langue

Version: 2009-04-23 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)

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".