NAME

App::PipeFilter::Role::Reader::LineByLine - read input streams one line at a time

VERSION

version 0.005

SYNOPSIS

This is not a complete module.

package App::PipeFilter::MysqlToJson;

use Moose;

extends 'App::PipeFilter::Generic';
with qw(
  App::PipeFilter::Role::Reader::LineByLine
  App::PipeFilter::Role::Output::Json
  App::PipeFilter::Role::Transform::None
);

... implementation goes here ....

1;

DESCRIPTION

App::PipeFilter::Role::Reader::LineByLine implements a read_input() method that returns one line of input at a time.

App::PipeFilter::Generic uses read_input() to consume data from its current input filehandle.

This role is recommended whenever the input data source or stream format are not easy to parse in chunks. Classes should consume App::PipeFilter::Role::Reader::Sysread when possible since it is often faster.

PUBLIC METHODS

read_input FILEHANDLE, SCALAR_REF

read_input() reads the next line from a FILEHANDLE and appends it to the buffer pointed at by a SCALAR_REF. It returns true if it read something, or false if it reached the end of file.

SEE ALSO

You may read this module's implementation in its entirety at

perldoc -m App::PipeFilter::Role::Reader::LineByLine

App::PipeFilter has top-level documentation including a table of contents for all the libraries and utilities included in the project.

BUGS

https://rt.cpan.org/Public/Dist/Display.html?Name=App-PipeFilter

REPOSITORY

https://github.com/rcaputo/app-pipefilter

COPYRIGHT AND LICENSE

App::PipeFilter::Role::Reader::LineByLine is Copyright 2011 by Rocco Caputo. All rights are reserved. App::PipeFilter::Role::Reader::LineByLine is released under the same terms as Perl itself.