Dale Amon > FileHash-0.01-3 > FileHash::Report

Download:
FileHash-0.01-3.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

 FileHash::Report - Generate reports from a FileHash.

SYNOPSIS ^

 use FileHash::Report;
 $obj  = FileHash::Report->new;
 $obj  = $obj->all         ($filehash,$report,$fmtflg)

Inheritance ^

 UNIVERSAL

Description ^

 Write simple reports. The output data is printed in search key/bucket order.

Examples ^

 use FileHash::Content;
 use FileHash::Report;

 my $r = FileHash::Report->new;
 my $a = FileHash::Content->alloc;
         $a->initFromTree ("/root");

 # print a list of all sets of files with the same md5sum and size.
 my $c = $a->identical;
         $r->all ($c,"myreport");

 # Hash the data by name instead.
 my $b = FileHash::Name->alloc;
         $b->initFromTree ($a);

 # print a list of all sets of files with the same file name.
    $c = $b->identical;
         $r->all ($c,"myreport2");

 # Print a list of all files found in a that are not in b
    $a = FileHash::Content->alloc; 
    $b = FileHash::Content->alloc; 
         $a->initFromTree ("/home/me/tree1");
         $b->initFromTree ("/home/me/tree2");
    $c = $a->andnot ($b);
         $r->all ($c,"myreport3");

 # Print a list of all files found in a that are in one or the
 # other but not both.
 my $c = $a->xor ($b);
         $r->all ($c,"myreport3");

Class Variables ^

 None.

Instance Variables ^

 None.

Class Methods ^

$obj = FileHash::Report->new

Create instances of FileHash::Report.

Instance Methods ^

Methods return self on success and undef on error unless stated otherwise.

A 'group of files' are files that have the same hash key.

$obj = $obj->all ($filehash,$report,$fmtflg)

Write a report of all files in $filehash to a file named $report. If the format flag exists and is true, linefeeds are printed between each group on output.

Private Class Method ^

 None.

Private Instance Methods ^

 None.

Errors and Warnings ^

 Lots.

KNOWN BUGS ^

 See TODO.

SEE ALSO ^

 FileHash::Base, Fault::Logger.

AUTHOR ^

Dale Amon <amon@vnl.com>