App::PipeFilter::Role::Reader::Sysread - read input streams in large chunks for speed
version 0.005
package App::PipeFilter::Generic::Json; use Moose; extends 'App::PipeFilter::Generic'; with qw( App::PipeFilter::Role::Reader::Sysread App::PipeFilter::Role::Input::Json App::PipeFilter::Role::Output::Json ); 1;
App::PipeFilter::Role::Reader::Sysread implements a read_input() method that returns large chunks of input at a time. Input chunks are arbitrary; they do not honor the structure of the files being read.
App::PipeFilter::Generic uses read_input() to consume data from its current input filehandle.
This role is faster than App::PipeFilter::Role::Reader::LineByLine, but it may not work with all devices. Some data formats may be easier to work with on a line-by-line basis.
read_input() reads the next chunk of data from a FILEHANDLE using Perl's built-in sysread() function. It appends this chunk of data to the buffer pointed at by a SCALAR_REF. It returns sysread()'s result.
You may read this module's implementation in its entirety at
perldoc -m App::PipeFilter::Role::Reader::Sysread
App::PipeFilter has top-level documentation including a table of contents for all the libraries and utilities included in the project.
https://rt.cpan.org/Public/Dist/Display.html?Name=App-PipeFilter
https://github.com/rcaputo/app-pipefilter
App::PipeFilter::Role::Reader::Sysread is Copyright 2011 by Rocco Caputo. All rights are reserved. App::PipeFilter::Role::Reader::Sysread is released under the same terms as Perl itself.
To install App::PipeFilter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PipeFilter
CPAN shell
perl -MCPAN -e shell install App::PipeFilter
For more information on module installation, please visit the detailed CPAN module installation guide.