Slackware::Slackget::MD5 - A simple class to verify files checksums


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.

Index


NOM

Top

Slackware::Slackget::MD5 - A simple class to verify files checksums

VERSION

Top

Version 0.2

SYNOPSIS

Top

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

Top

new() : The constructor doesn't take any arguments but be sure the md5sum binary is in the PATH !

METHODS

Top

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

Top

DUPUIS Arnaud, <a.dupuis@infinityperl.org>

BUGS

Top

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

Top

You can find documentation for this module with the perldoc command.

    perldoc Slackware::Slackget




You can also look for information at:

* Infinity Perl website

http://www.infinityperl.org/category/slack-get

* slack-get specific website

http://slackget.infinityperl.org

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Slackware-Slackget

* CPAN Ratings

http://cpanratings.perl.org/d/Slackware-Slackget

* Search CPAN

http://search.cpan.org/dist/Slackware-Slackget

ACKNOWLEDGEMENTS

Top

Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.

SEE ALSO

Top

COPYRIGHT & LICENSE

Top


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.