1POE::Filter::RecordBlocUks(e3r)Contributed Perl DocumentPaOtEi:o:nFilter::RecordBlock(3)
2
3
4

NAME

6       POE::Filter::RecordBlock - translate between discrete records and
7       blocks of them
8

SYNOPSIS

10       Hello, dear reader.  This SYNOPSIS does not contain a fully functioning
11       sample program because your humble documenter cannot come up with a
12       short, reasonable use case for this module.  Please contact the
13       maintainer if this module is useful to you.  Otherwise you may wake up
14       one morning to discover that it has been deprecated.
15
16         $filter = new POE::Filter::RecordBlock( BlockSize => 4 );
17         $arrayref_of_arrayrefs = $filter->get($arrayref_of_raw_data);
18         $arrayref_of_raw_chunks = $filter->put($arrayref_of_arrayrefs);
19         $arrayref_of_raw_chunks = $filter->put($single_arrayref);
20         $arrayref_of_leftovers = $filter->get_pending;
21         $arrayref_of_leftovers = $filter->put_pending;
22

DESCRIPTION

24       On input, POE::Filter::RecordBlock translates a stream of discrete
25       items into a "block" of them.  It does this by collecting items until
26       it has BlockSize of them, then returning the lot of them in an array
27       reference.
28
29       On output, this module flattens array references.
30
31       This module may be deprecated in the future.  Please contact the
32       maintainer if this module is useful to you.
33

PUBLIC FILTER METHODS

35       In addition to the usual POE::Filter methods, POE::Filter::RecordBlock
36       supports the following.
37
38   new
39       new() takes at least one mandatory argument, BlockSize, which must be
40       defined and greater than zero.  new() also accepts a CheckPut Boolean
41       parameter that indicates whether put() should check for the proper
42       BlockSize before allowing data to be serialized.
43
44       Using CheckPut is not recommended, as it enables a write buffer in the
45       filter, therefore breaking put() for normal use.
46
47   put_pending
48       put_pending() returns an arrayref of any records that are waiting to be
49       sent.  It is the outbound equivalent of POE::Filter's get_pending()
50       accessor.  put_pending() is not part of the canonical POE::Filter API,
51       so nothing will use it.  It's up to applications to handle pending
52       output, whenever it's appropriate to do so.
53
54   blocksize
55       blocksize() is an accessor/mutator for POE::Filter::RecordBlock's
56       BlockSize value.
57
58   checkput
59       checkput() is an accessor/mutator for POE::Filter::RecordBlock's
60       CheckPut flag.
61

SEE ALSO

63       POE::Filter for more information about filters in general.
64
65       POE::Filter::Stackable for more details on stacking filters.
66

BUGS

68       This filter may maintain an output buffer that no other part of POE
69       will know about.
70
71       This filter implements a highly specialized and seemingly not generally
72       useful feature.
73
74       Does anyone use this filter?  This filter may be deprecated if nobody
75       speaks up.
76

AUTHORS & COPYRIGHTS

78       The RecordBlock filter was contributed by Dieter Pearcey.
79       Documentation is provided by Rocco Caputo.
80
81       Please see the POE manpage for more information about authors and
82       contributors.
83
84
85
86perl v5.28.0                      2015-06-03       POE::Filter::RecordBlock(3)
Impressum