The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

LRpt::CSVEADiff - A module for comparing a set of csv files with expectations

SYNOPSIS

  lcsveadiff.pl --keys_file=keys.txt --cmp_rules=cmp_rules.xml 
                --log_file=logfile.txt --expectations=exp.xml actual_dir 

DESCRIPTION

This module is a part of LRpt (LReport) library. It is used to compare set of csv files with expectations and report found differences. You should not use LRpt::CSVEADiff module directly in your code. Instead you should use lcsveadiff.pl tool, which is a simple wrapper around the module. lcsveadiff.pl looks like this:

  use strict;
  use LRpt::CSVEADiff;
  
  ea_diff( @ARGV );
  

COMMAND LINE OPTIONS

--key=string

Row key defined in command line as one string. Don't use it. I will probably get read of this switch in future

--keys_file=file

Name of the file containing row keys definitions

--cmp_rules=$cmp_rules

Name of a file containing comparing rules.

--log_file=$log_file

Name of a file to which log messages should be written

--expectations=$e_file

Name of a file containing expectations

--help

Prints help screen.

actual_dir

A file name or a directory containing actual state.

METHODS

In this sections you will find a more or less complete listing of all methods provided by the package.

ea_diff

  ea_diff( @ARGV );

Main function. @ARGV is processes by standard Getopt::Long module. Meaning of each switch is given in SYNOPSIS.

load_expectations

  load_expectations( $exp_file );

Loads expecations from the file $exp_file.

load_csvs

  load_csvs();

Loads all csvs, which names are given in a command line

load_csv_file

  load_csv_file();

Loads one csv file.

compare

  compare( $cmp_rules_file, $log_file );

Compare loaded data with expectations.

  print_usage();

Prints usage text.

SEE ALSO

The project is maintained on Source Forge http://lreport.sourceforge.net. You can find there links to some helpful documentation like tutorial.

AUTHORS

Piotr Kaluski <pkaluski@piotrkaluski.com>

COPYRIGHT

Copyright (c) 2004-2006 Piotr Kaluski. Poland. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.