NAME
ETL::Yertl::FormatStream - Read/write I/O stream with Yertl formatters
VERSION
version 0.044
SYNOPSIS
use ETL::Yertl;
use ETL::Yertl::FormatStream;
use ETL::Yertl::Format;
use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $format = ETL::Yertl::Format->get( "json" );
my $input = ETL::Yertl::FormatStream->new(
read_handle => \*STDIN,
format => $format,
on_doc => sub {
my ( $self, $doc, $eof ) = @_;
# ... do something with $doc
if ( $eof ) {
$loop->stop;
}
},
);
$loop->add( $input );
$loop->run;
DESCRIPTION
SEE ALSO
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.