Manual Reference Pages - POE::FILTER::RECORDBLOCK (3)
POE::Filter::RecordBlock - translate between discrete records and blocks of them
Hello, dear reader. This SYNOPSIS does not contain a fully
functioning sample program because your humble documenter cannot come
up with a short, reasonable use case for this module. Please contact
the maintainer if this module is useful to you. Otherwise you may wake
up one morning to discover that it has been deprecated.
$filter = new POE::Filter::RecordBlock( BlockSize => 4 );
$arrayref_of_arrayrefs = $filter->get($arrayref_of_raw_data);
$arrayref_of_raw_chunks = $filter->put($arrayref_of_arrayrefs);
$arrayref_of_raw_chunks = $filter->put($single_arrayref);
$arrayref_of_leftovers = $filter->get_pending;
$arrayref_of_leftovers = $filter->put_pending;
On input, POE::Filter::RecordBlock translates a stream of discrete
items into a block of them. It does this by collecting items until
it has BlockSize of them, then returning the lot of them in an array
On output, this module flattens array references.
This module may be deprecated in the future. Please contact the
maintainer if this module is useful to you.
PUBLIC FILTER METHODS
In addition to the usual POE::Filter methods, POE::Filter::RecordBlock
supports the following.
new() takes at least one mandatory argument, BlockSize, which must be
defined and greater than zero. new() also accepts a CheckPut Boolean
parameter that indicates whether put() should check for the proper
BlockSize before allowing data to be serialized.
Using CheckPut is not recommended, as it enables a write buffer in the
filter, therefore breaking put() for normal use.
put_pending() returns an arrayref of any records that are waiting to
be sent. It is the outbound equivalent of POE::Filters get_pending()
accessor. put_pending() is not part of the canonical POE::Filter API,
so nothing will use it. Its up to applications to handle pending
output, whenever its appropriate to do so.
blocksize() is an accessor/mutator for POE::Filter::RecordBlocks
checkput() is an accessor/mutator for POE::Filter::RecordBlocks
POE::Filter for more information about filters in general.
POE::Filter::Stackable for more details on stacking filters.
This filter may maintain an output buffer that no other part of POE
will know about.
This filter implements a highly specialized and seemingly not
generally useful feature.
Does anyone use this filter? This filter may be deprecated if nobody
AUTHORS & COPYRIGHTS
The RecordBlock filter was contributed by Dieter Pearcey.
Documentation is provided by Rocco Caputo.
Please see the POE manpage for more information about authors and
|perl v5.20.3 ||POE::FILTER::RECORDBLOCK (3) ||2015-06-03 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.