NOM
Slackware::Slackget::MD5 - A simple class to verify files checksums
VERSION
Version 0.2
SYNOPSIS
A simple class to verify files checksums with md5sum.
use Slackware::Slackget::MD5;
my $slackget10_gpg_object = Slackware::Slackget::MD5->new();
IMPORTANT NOTE : This class is not design to be use by herself (the constructor for example is totaly useless). the Slackware::Slackget::Package class inheritate of this class and this is the way is design Slackware::Slackget::MD5 : to be only an abstraction of the MD5 verification operations.
You may prefer to inheritate from this class, but take attention to the fact that I design it to be inheritate by the Slackware::Slackget::Package class !
CONSTRUCTOR
new() : The constructor doesn't take any arguments but be sure the md5sum binary is in the PATH !
METHODS
verify_md5
This method call the getValue() accessor (from the Slackware::Slackget::Package class) on the 'checksum' or 'signature-checksum' field, and check if it match with the MD5 of the file passed in argument.
If the argument ends with ".tgz" this method use the 'checksum' field and if it ends with ".asc" it use the 'signature-checksum' field.
$package->verify_md5("/home/packages/update/package-cache/apache-1.3.33-i486-1.tgz") && $sgo->installpkg($packagelist->get_indexed("apache-1.3.33-i486-1")) ;
Returned values :
undef : if a problem occur (ex: the current instance do not inheritate from Slackware::Slackget::Package, the file is not a package nor a signature, etc.)
1 : if the MD5 is ok
0 : if not.
This method also set a 'computed-checksum' and a 'computed-signature-checksum' in the current Slackware::Slackget::Package object.
AUTHOR
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
BUGS
Please report any bugs or feature requests to bug-Slackware-Slackget@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget
You can also look for information at:
Infinity Perl website
slack-get specific website
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.
SEE ALSO
COPYRIGHT & LICENSE
Copyright 2005 DUPUIS Arnaud, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.