Piotr Kaluski > LRpt_0.16 > LRpt::CSVDiff

Download:
LRpt_0.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

LRpt::CSVDiff - A module for comparing 2 sets of csv files

SYNOPSIS ^

  lcsvdiff.pl --all --keys_file=rkeys.txt --chunk_size=num before_dir after_dir 

DESCRIPTION ^

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

  use LRpt::CSVDiff;
  use strict;
  
  diff( @ARGV );

COMMAND LINE OPTIONS ^

--all

If set, not only differences are reported, but all rows from both rowsets.

--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

--chunk_size=num

Number of rows retrieved in one chunk. If not defined - default chunking size is used. If equal to zero, than no chunking is used (all rows are loaded to memory

--help

Prints help screen.

before_dir

A file name or a directory containing files with before state.

after_dir

A file name or a directory containing files with after state.

METHODS ^

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

diff

  diff( @ARGV );

Main function. @ARGV is processed by standard Getopt::Long module. Switches have the following meaning (see SYNOPSIS.

--all

If set, not only differences are reported, but all rows from both rowsets.

--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

--chunk_size=num

Number of rows retrieved in one chunk. If not defined - default chunking size is used. If equal to zero, than no chunking is used (all rows are loaded to memory

before_dir

A file name or a directory containing files with before state.

after_dir

A file name of a directory containing files with after state.

compare

  compare( $st1_file, $st2_file );

Compares 2 files. If one or two of given filenames are actually directory names then diff behavior is mimiced.

compare_two_files

  compare_two_files( $file1, $file2 );

Performs row/column oriented comparison between 2 files

print_usage

  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.

syntax highlighting: