Data-Tubes

 view release on metacpan or  search on metacpan

lib/Data/Tubes/Plugin/Reader.pod  view on Meta::CPAN

=over

=item C<chomp>

apply the C<chomp> function before emitting what's read. Defaults to a
I<true> value;

=item C<emit_eof>

when an end-of-file is hit, emit a record with the output field set to
C<undef>, so that this condition will be visible in the tubes on the
downstream. Defaults to a I<false> value;

=item C<identification>

you don't normally need to use this... so look at the code in case you
have to;

=item C<input>

name of the input field in the record. If defined and not empty, it
points to a sub-hash that will contain a filehandle field C<fh>;
otherwise, this C<fh> field MUST be contained directly in the input
record contents. Defaults to C<source>;

=item C<name>

name of the tube, for easier debugging;

=item C<output>

name of the output field. The output record is ALWAYS a hash reference,
containing the input record and the output correponding to this key.
Defaults to C<raw>;

=item C<separator>

a separator string to set as C<INPUT_RECORD_SEPARATOR>, see L<perlvar>.
This parameter defaults to C<undef>. It is the I<main> parameter, so it
can also be provided as the first unnamed argument when calling this
factory function.

=back

=head2 B<< read_by_line >>

Alias for L</by_line>.

=head2 B<< read_by_paragraph >>

Alias for L</by_paragraph>.

=head2 B<< read_by_record_reader >>

Alias for L</by_record_reader>.

=head2 B<< read_by_separator >>

Alias for L</by_separator>.

=head1 BUGS AND LIMITATIONS

Report bugs either through RT or GitHub (patches welcome).

=head1 AUTHOR

Flavio Poletti <polettix@cpan.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2016 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it
under the terms of the Artistic License 2.0.

This program 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.

=cut



( run in 0.724 second using v1.01-cache-2.11-cpan-39bf76dae61 )