# POE::Filter::RecordBlock - translate between discrete records and block... - perldoc - [phpMan]

## NAME
    [POE::Filter::RecordBlock](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter%3A%3ARecordBlock/markdown) - translate between discrete records and blocks of them

## SYNOPSIS
    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](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter%3A%3ARecordBlock/markdown)( 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;

## DESCRIPTION
    On input, [POE::Filter::RecordBlock](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter%3A%3ARecordBlock/markdown) 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 reference.

    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](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter/markdown) methods, [POE::Filter::RecordBlock](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter%3A%3ARecordBlock/markdown) supports the following.

  new
### new
    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
### put_pending
    equivalent of [POE::Filter](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter/markdown)'s get_pending() accessor. put_pending() is not part of the canonical
    [POE::Filter](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter/markdown) API, so nothing will use it. It's up to applications to handle pending output,
    whenever it's appropriate to do so.

  blocksize
### blocksize

  checkput
### checkput

## SEE ALSO
    [POE::Filter](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter/markdown) for more information about filters in general.

    [POE::Filter::Stackable](https://www.chedong.com/phpMan.php/perldoc/POE%3A%3AFilter%3A%3AStackable/markdown) for more details on stacking filters.

## BUGS
    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 speaks up.

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

