The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Filter - convert between raw and cooked streams

SYNOPSIS

  $filter = new POE::Filter::Derivative();

DESCRIPTION

Derivatives of POE::Filter provide standard IO cooking and uncooking for their parent IO::Sessions. For example, POE::Filter::Line breaks up input into newline-delimited chunks of input, and it appends newlines to the ends of chunks being output.

PUBLIC METHODS

new POE::Filter::Derivative

$filter = new POE::Filter::Derivative()

Creates an instance of the given filter.

$filter->put($chunk)

Returns a version of $chunk that is formatted according to the protocol that the filter implements.

$filter->get($chunk)

Returns a reference to an array of zero or more formatted pieces of $chunk. Partial chunks are held inside POE::Filter until they are completed.

EXAMPLES

Please see tests/selects.perl for an example of POE::Filter::Line.

BUGS

None known.

CONTACT AND COPYRIGHT

Copyright 1998 Rocco Caputo <troc@netrus.net>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.