App-CSVUtils

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Data::Dmp" : "0.242",
            "Data::Sah" : "0.917",
            "Data::Sah::Compiler::perl::TH::any" : "0.914",
            "Data::Sah::Compiler::perl::TH::array" : "0.914",
            "Data::Sah::Compiler::perl::TH::bool" : "0.914",
            "Data::Sah::Compiler::perl::TH::code" : "0.914",
            "Data::Sah::Compiler::perl::TH::hash" : "0.914",
            "Data::Sah::Compiler::perl::TH::int" : "0.914",
            "Data::Sah::Compiler::perl::TH::re" : "0.914",
            "Data::Sah::Compiler::perl::TH::str" : "0.914",
            "Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
            "Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
            "Data::Sah::Filter::perl::Re::re_from_str" : "0",
            "Data::Sah::Filter::perl::Str::maybe_convert_to_re" : "0",
            "Data::Sah::Filter::perl::Str::maybe_eval" : "0",
            "Exporter" : "5.57",
            "File::Slurper::Dash" : "0",
            "Getopt::Long" : "2.50",
            "List::Util" : "1.54",
            "Log::ger" : "0.038",
            "Module::List::Tiny" : "0",
            "Number::Util::Range" : "0.005",

META.yml  view on Meta::CPAN

  Data::Dmp: '0.242'
  Data::Sah: '0.917'
  Data::Sah::Compiler::perl::TH::any: '0.914'
  Data::Sah::Compiler::perl::TH::array: '0.914'
  Data::Sah::Compiler::perl::TH::bool: '0.914'
  Data::Sah::Compiler::perl::TH::code: '0.914'
  Data::Sah::Compiler::perl::TH::hash: '0.914'
  Data::Sah::Compiler::perl::TH::int: '0.914'
  Data::Sah::Compiler::perl::TH::re: '0.914'
  Data::Sah::Compiler::perl::TH::str: '0.914'
  Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix: '0'
  Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix: '0'
  Data::Sah::Filter::perl::Re::re_from_str: '0'
  Data::Sah::Filter::perl::Str::maybe_convert_to_re: '0'
  Data::Sah::Filter::perl::Str::maybe_eval: '0'
  Exporter: '5.57'
  File::Slurper::Dash: '0'
  Getopt::Long: '2.50'
  List::Util: '1.54'
  Log::ger: '0.038'
  Module::List::Tiny: '0'
  Number::Util::Range: '0.005'

Makefile.PL  view on Meta::CPAN

    "Data::Dmp" => "0.242",
    "Data::Sah" => "0.917",
    "Data::Sah::Compiler::perl::TH::any" => "0.914",
    "Data::Sah::Compiler::perl::TH::array" => "0.914",
    "Data::Sah::Compiler::perl::TH::bool" => "0.914",
    "Data::Sah::Compiler::perl::TH::code" => "0.914",
    "Data::Sah::Compiler::perl::TH::hash" => "0.914",
    "Data::Sah::Compiler::perl::TH::int" => "0.914",
    "Data::Sah::Compiler::perl::TH::re" => "0.914",
    "Data::Sah::Compiler::perl::TH::str" => "0.914",
    "Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" => 0,
    "Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" => 0,
    "Data::Sah::Filter::perl::Re::re_from_str" => 0,
    "Data::Sah::Filter::perl::Str::maybe_convert_to_re" => 0,
    "Data::Sah::Filter::perl::Str::maybe_eval" => 0,
    "Exporter" => "5.57",
    "File::Slurper::Dash" => 0,
    "Getopt::Long" => "2.50",
    "List::Util" => "1.54",
    "Log::ger" => "0.038",
    "Module::List::Tiny" => 0,
    "Number::Util::Range" => "0.005",

Makefile.PL  view on Meta::CPAN

  "Data::Dmp" => "0.242",
  "Data::Sah" => "0.917",
  "Data::Sah::Compiler::perl::TH::any" => "0.914",
  "Data::Sah::Compiler::perl::TH::array" => "0.914",
  "Data::Sah::Compiler::perl::TH::bool" => "0.914",
  "Data::Sah::Compiler::perl::TH::code" => "0.914",
  "Data::Sah::Compiler::perl::TH::hash" => "0.914",
  "Data::Sah::Compiler::perl::TH::int" => "0.914",
  "Data::Sah::Compiler::perl::TH::re" => "0.914",
  "Data::Sah::Compiler::perl::TH::str" => "0.914",
  "Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" => 0,
  "Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" => 0,
  "Data::Sah::Filter::perl::Re::re_from_str" => 0,
  "Data::Sah::Filter::perl::Str::maybe_convert_to_re" => 0,
  "Data::Sah::Filter::perl::Str::maybe_eval" => 0,
  "Exporter" => "5.57",
  "File::Slurper" => 0,
  "File::Slurper::Dash" => 0,
  "File::Spec" => 0,
  "File::Temp" => "0.2310",
  "Getopt::Long" => "2.50",
  "IO::Handle" => 0,

lib/App/CSVUtils/csv_cmp.pm  view on Meta::CPAN


use App::CSVUtils qw(
                        gen_csv_util
                );

gen_csv_util(
    name => 'csv_cmp',
    summary => 'Compare two CSV files value by value',
    description => <<'MARKDOWN',

This utility is modelled after the Unix command `cmp`; it compares two CSV files
value by value and ignore quoting (and can be instructed to ignore whitespaces,
case difference).

If all the values of two CSV files are identical, then utility will exit with
code 0. If a value differ, this utility will stop, print the difference and exit
with code 1.

If `-l` (`--detail`) option is specified, all differences will be reported. Note
that in `cmp` Unix command, the `-l` option is called `--verbose`. The detailed
report is in the form of CSV:

    rownum,fieldnum,value1,value2

where `rownum` begins at 1 (for header row), `fieldnum` begins at 1 (first
field), `value1` is the value in first CSV file, `value2` is the value in the
second CSV file.

Other notes:

lib/App/CSVUtils/csv_cmp.pm  view on Meta::CPAN

=item * Compare two CSV files case-insensitively (-i), show detailed report (-l):

 csv_cmp(
     input_filenames => ["file1.csv", "file2.csv"],
   detail => 1,
   ignore_case => 1
 );

=back

This utility is modelled after the Unix command C<cmp>; it compares two CSV files
value by value and ignore quoting (and can be instructed to ignore whitespaces,
case difference).

If all the values of two CSV files are identical, then utility will exit with
code 0. If a value differ, this utility will stop, print the difference and exit
with code 1.

If C<-l> (C<--detail>) option is specified, all differences will be reported. Note
that in C<cmp> Unix command, the C<-l> option is called C<--verbose>. The detailed
report is in the form of CSV:

 rownum,fieldnum,value1,value2

where C<rownum> begins at 1 (for header row), C<fieldnum> begins at 1 (first
field), C<value1> is the value in first CSV file, C<value2> is the value in the
second CSV file.

Other notes:

lib/App/CSVUtils/csv_split.pm  view on Meta::CPAN

    description => <<'MARKDOWN',

Will output split files xaa, xab, and so on. Each split file will contain a
maximum of `lines` rows (options to limit split files' size based on number of
characters and bytes will be added). Each split file will also contain CSV
header.

Warning: by default, existing split files xaa, xab, and so on will be
overwritten.

Interface is loosely based on the `split` Unix utility.

MARKDOWN
    add_args => {
        lines => {
            schema => 'posint*',
            default => 1000,
            cmdline_aliases => {l=>{}},
        },
        # XXX --bytes (-b)
        # XXX --line-bytes (-C)

lib/App/CSVUtils/csv_split.pm  view on Meta::CPAN

=back

Will output split files xaa, xab, and so on. Each split file will contain a
maximum of C<lines> rows (options to limit split files' size based on number of
characters and bytes will be added). Each split file will also contain CSV
header.

Warning: by default, existing split files xaa, xab, and so on will be
overwritten.

Interface is loosely based on the C<split> Unix utility.

This function is not exported.

Arguments ('*' denotes required arguments):

=over 4

=item * B<inplace> => I<true>

Output to the same file as input.

script/csv-cmp  view on Meta::CPAN

B<csv-cmp> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)

B<csv-cmp> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--detail|/"--detail, -l">>|B<L<-l|/"--detail, -l">>] [B<L<--exclude-field-pat|/"--ex...



See examples in the L</EXAMPLES> section.

=head1 DESCRIPTION

This utility is modelled after the Unix command C<cmp>; it compares two CSV files
value by value and ignore quoting (and can be instructed to ignore whitespaces,
case difference).

If all the values of two CSV files are identical, then utility will exit with
code 0. If a value differ, this utility will stop, print the difference and exit
with code 1.

If C<-l> (C<--detail>) option is specified, all differences will be reported. Note
that in C<cmp> Unix command, the C<-l> option is called C<--verbose>. The detailed
report is in the form of CSV:

 rownum,fieldnum,value1,value2

where C<rownum> begins at 1 (for header row), C<fieldnum> begins at 1 (first
field), C<value1> is the value in first CSV file, C<value2> is the value in the
second CSV file.

Other notes:

script/csv-split  view on Meta::CPAN

=head1 DESCRIPTION

Will output split files xaa, xab, and so on. Each split file will contain a
maximum of C<lines> rows (options to limit split files' size based on number of
characters and bytes will be added). Each split file will also contain CSV
header.

Warning: by default, existing split files xaa, xab, and so on will be
overwritten.

Interface is loosely based on the C<split> Unix utility.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--lines>=I<s>, B<-l>



( run in 1.096 second using v1.01-cache-2.11-cpan-64ef6c95b5d )