NAME

PerlIO::via::EscStatus::Parser - parse out status escape lines

SYNOPSIS

use PerlIO::via::EscStatus::Parser;
my $ep = PerlIO::via::EscStatus::Parser->new;
my ($text, $status) = $ep->parse ($input);

DESCRIPTION

An EscStatus::Parser object parses out EscStatus format status strings from text. This is used by the EscStatus layers and is offered for parsing a stream the same way the layers do.

FUNCTIONS

$ep = PerlIO::via::EscStatus::Parser->new

Create and return a new parser object.

($text, $status) = $ep->parse ($input)

Parse an input string $input and return the plain $text part of that input, and the last complete $status line. If there's no complete status line yet then $status is undef. If there's no plain text, ie. if the input is entirely status, then $text is an empty string "".

$input doesn't have to be complete lines. Any partial status at the end of it is held in $ep and will be returned on a later parse call when the full line has been received.

SEE ALSO

PerlIO::via::EscStatus

HOME PAGE

http://user42.tuxfamily.org/perlio-via-escstatus/index.html

LICENSE

Copyright 2008, 2009, 2010, 2011, 2012 Kevin Ryde

PerlIO-via-EscStatus is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

PerlIO-via-EscStatus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with PerlIO-via-EscStatus. If not, see http://www.gnu.org/licenses/