NAME
Data::Record::Serialize::Encode::csv_stream - encode a record as csv
VERSION
version 0.01
SYNOPSIS
use Data::Record::Serialize;
my $s = Data::Record::Serialize->new( encode => 'csv_stream', ... );
$s->send( \%record );
DESCRIPTION
Data::Record::Serialize::Encode::csv_stream encodes a record as CSV (well anything that Text::CSV can write) and writes it to a stream.
It performs both the Data::Record::Serialize::Role::Encode and Data::Record::Serialize::Role::Sink roles.
It is more efficient than coupling the Data::Record::Serialize::Encode::csv encoder with the Data::Record::Serialize::Sink::stream|stream sink.
CONSTRUCTOR OPTIONS
Text::CSV Options
These are passed through to Text::CSV:
- binary => Boolean
-
Default: true
- sep_char => character
-
Default:
,
- quote_char => character
-
Default:
"
- escape_char => i<character>
-
Default:
"
- always_quote => Boolean
-
Default: false q
- quote_empty => Boolean
-
Default: false
Stream Options
output
-
The name of an output file or a reference to a scalar to which the records will be written.
output
may be set to-
to indicate output to the standard output stream. fh
-
A file handle.
If neither is specified, output is written to the standard output stream.
SUPPORT
Bugs
Please report any bugs or feature requests to bug-data-record-serialize-encode-csv@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Record-Serialize-Encode-csv
Source
Source is available at
https://gitlab.com/djerius/data-record-serialize-encode-csv
and may be cloned from
https://gitlab.com/djerius/data-record-serialize-encode-csv.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2022 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007