Data::Stream::Bulk

N at a time iteration API
Download

Data::Stream::Bulk Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Yuval Kogman
  • Publisher web site:
  • http://search.cpan.org/~nobull/

Data::Stream::Bulk Tags


Data::Stream::Bulk Description

N at a time iteration API Data::Stream::Bulk is a Perl module that tries to find middle ground between one at a time and all at once processing of data sets.The purpose of this module is to avoid the overhead of implementing an iterative api when this isn't necessary, without breaking forward compatibility in case that becomes necessary later on.The API optimizes for when a data set typically fits in memory and is returned as an array, but the consumer cannot assume that the data set is bounded.The API is destructive in order to minimize the chance that resultsets are leaked due to improper usage.SYNOPSIS # get a bulk stream from somewere my $s = Data::Stream::Bulk::Foo->new( ... ); # can be used like this: until ( $s->is_done ) { foreach my $item ( $s->items ) { process($item); } } # or like this: while( my $block = $s->next ) { foreach my $item ( @$block ) { process($item); } } Requirements: · Perl


Data::Stream::Bulk Related Software