CPAN::Checksums - Write a CHECKSUMS file for a directory as on CPAN |
CPAN::Checksums - Write a CHECKSUMS file for a directory as on CPAN
use CPAN::Checksums qw(updatedir); my $success = updatedir($directory);
Since version 1.0 the generation of the attribute shortname
is
turned off by default. It was too slow and was not used as far as I
know, and above all, it could fail on large directories. The shortname
feature can still be turned on by setting the global variable
$TRY_SHORTNAME to a true value.
updatedir takes a directory name as argument and writes a typical CHECKSUMS file in that directory as used on CPAN unless a previously written CHECKSUMS file is there that is still valid. Returns 2 if a new CHECKSUMS file has been written, 1 if a valid CHECKSUMS file is already there, otherwise dies.
qr{(?i-xsm:readme$)}
updatedir()
to report
changes of files in the attributes size
, mtime
, md5
, or
md5-ungz
to STDERR.
updatedir()
to include an attribute shortname
in the resulting
hash that is 8.3-compatible. Please note, that updatedir()
in this
case may be slow and may even fail on large directories, because it
will always only try 1000 iterations to find a name that is not yet
taken and then give up.
gpg --clearsign --default-key
), passing the signing
key as an extra argument. The resulting CHECKSUMS file should look like:
0&&<<''; # this PGP-signed message is also valid perl -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
# CHECKSUMS file written on ... by CPAN::Checksums (v...) $cksum = { ... };
__END__ -----BEGIN PGP SIGNATURE----- ... -----END PGP SIGNATURE-----
note that the actual data remains intact, but two extra lines are added to make it legal for both OpenPGP and perl syntax.
DirHandle, IO::File, Digest::MD5, Compress::Zlib, File::Spec, Data::Dumper, Data::Compare
Andreas Koenig, andreas.koenig@anima.de; GnuPG support by Autrijus Tang
perl(1).
CPAN::Checksums - Write a CHECKSUMS file for a directory as on CPAN |