POE::Filter::Line - POE Line Protocol Abstraction |
POE::Filter::Line - POE Line Protocol Abstraction
$filter = new POE::Filter::Line(); $arrayref_of_lines = $filter->get($arrayref_of_raw_chunks_from_driver); $arrayref_of_streamable_chunks_for_driver = $filter->put($arrayref_of_lines); $arrayref_of_streamable_chunks_for_driver = $filter->put($single_line);
The Line filter translates streams to and from newline-separated lines. The lines it returns do not contain newlines. Neither should the lines given to it.
Incoming newlines are recognized with the regexp
/(\x0D\x0A?|\x0A\x0D?)/
. Incomplete lines are buffered until a
subsequent packet completes them.
Outgoing lines have the network newline attached to them:
"\x0D\x0A"
.
Please see POE::Filter.
POE::Filter; POE::Filter::HTTPD; POE::Filter::Reference; POE::Filter::Stream
This filter's newlines are hard-coded.
Please see the POE manpage.
POE::Filter::Line - POE Line Protocol Abstraction |