App-CSV

 view release on metacpan or  search on metacpan

bin/csv  view on Meta::CPAN

=head2 Command line options

The following options are passed to L<Text::CSV>. When preceded by the
prefix "output_", the destination is affected. Otherwise these options
affect both input and output.

=over 4

=item B<--quote_char>

=item B<--escape_char>

=item B<--sep_char>

=item B<--eol>

=item B<--always_quote>

=item B<--binary>

=item B<--keep_meta_info>

=item B<--allow_loose_quotes>

=item B<--allow_loose_escapes>

=item B<--allow_whitespace>

=item B<--verbatim>

=back

B<NOTE>: I<binary> is set to 1 by default in B<csv>. The other options have
their L<Text::CSV> defaults.

lib/App/CSV.pm  view on Meta::CPAN


# The input and output CSV processors.
hasrw _input_csv  => ();
hasrw _output_csv => ();

# Text::CSV options, straight from the manpage.
# We override Text::CSV's default here... because it's WRONG.
our %TextCSVOptions = (
    # name              => [type, default, alias, @extra_opts]
    quote_char          => ['Str', '"',   'q'],
    escape_char         => ['Str', '"',   'e'],
    sep_char            => ['Str', ',',   's', is => 'rw'],
    eol                 => ['Any', ''],
    always_quote        => ['Int', 0],
    binary              => ['Int', 1,     'b'],
    keep_meta_info      => ['Int', 0,     'k'],
    allow_loose_quotes  => ['Int', 0],
    allow_loose_escapes => ['Int', 0],
    allow_whitespace    => ['Int', 0,     'w'],
    verbatim            => ['Int', 0],
);

# output CSV processor options default to whatever the input option is.
# But you can override it just for output by saying --output_foo instead
# of --foo.   (Thanks, gphat and t0m.)
while (my($attr, $opts) = each %TextCSVOptions) {
  my($type, $default, $short, @extra_opts) = @$opts;
  hasro $attr => (



( run in 0.498 second using v1.01-cache-2.11-cpan-c21f80fb71c )