Digest::Directory::API - api class for Directory Digests
use Digest::Directory::API; my($d) = Digest::Directory::API->new(); $d->quiet(0); $d->configure("/etc/dirgests.conf"); my($r) = $d->compare("", "", "", "/etc/dirgests.text", 0, 0); ( $r > 0 ) && print "Warning: dirgests changed - inspect!\n";
Perl 5.004, Digest::Directory::BASE.
Nothing.
Digest::Directory::API provides a more general API over Digest::Directory::BASE that allows clients to configure, create, show, compare and update directory digests.
The following methods are provided:
Create a dirgest instance; default configuration is set up, with quiet = 0.
Enable quiet operating mode for a dirgest; ensures that no debug trace output is provided during operation.
$enabled => '0' or '1' for whether operation to be quiet or not;
Enable trim level, at specified count; all file/directory sets will have their prefix trimmed.
$count => 'n' where 'n' >= 0 && specifies the number of leading components of a name to remove.
Specify configuration for a dirgest;
$file => filename to read configuration from in the format as specified in Digest::Directory::BASE.pm;
\@incl => array of file/directory sets to include (in addition to those read from configuration file);
\@excl => array of file/directory sets to exclude (in addition to those read from configuration file);
return => '1' on success, or '0' on failure;
Create a dirgest and save to specified file;
$link => the link to fetch dirgests from;
$user => the http username to use with $link;
$pass => the http password to use with $link;
$file => the file to save dirgests to;
$nodetails => don't show detail dirgests during activity;
$nosummary => don't show summary dirgest during activity;
Show a dirgest from a resource with options;
Compare dirgests as obtained from resources or locally;
$showequal => show equal dirgests during activity;
Update a dirgest from a resource back to resource;
Matthew Gream (MGREAM) <matthew.gream@pobox.com>
Version 0.90.
Copyright 2002 Matthew Gream. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Digest::Directory::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Digest::Directory::API
CPAN shell
perl -MCPAN -e shell install Digest::Directory::API
For more information on module installation, please visit the detailed CPAN module installation guide.