1Data::Stream::Bulk::ChuUnskeerd(C3o)ntributed Perl DocumDeanttaa:t:iSotnream::Bulk::Chunked(3)
2
3
4
6 Data::Stream::Bulk::Chunked - combine streams into larger chunks
7
9 version 0.11
10
12 use Data::Stream::Bulk::Chunked;
13
14 Data::Stream::Bulk::Chunked->new(
15 stream => $s,
16 chunk_size => 10000,
17 );
18
20 This is a stream which wraps an existing stream to give more items in a
21 single block. This can simplify application code which does its own
22 processing one block at a time, and where processing larger blocks is
23 more efficient.
24
26 stream
27 The stream to chunk. Required.
28
29 chunk_size
30 The minimum number of items to return in a block. Defaults to 1
31 (which does nothing).
32
34 get_more
35 See Data::Stream::Bulk::DoneFlag.
36
37 Returns at least "chunk_size" items. Note that this isn't
38 guaranteed to return exactly "chunk_size" items - it just returns
39 multiple full blocks from the backend. Also, the final block
40 returned may have less than "chunk_size" items.
41
43 Yuval Kogman <nothingmuch@woobling.org>
44
46 This software is copyright (c) 2012 by Yuval Kogman.
47
48 This is free software; you can redistribute it and/or modify it under
49 the same terms as the Perl 5 programming language system itself.
50
51
52
53perl v5.28.0 2012-02-14 Data::Stream::Bulk::Chunked(3)