Parse::PAUSE - Parses CPAN upload emails sent by PAUSE
use Parse::PAUSE; my $content = 'The uploaded file...'; # body of CPAN upload email from PAUSE my $upload = Parse::PAUSE->parse($content); print $upload->pathname(), "\n"; # $CPAN/authors/id/S/SU/SUKRIA/Coat-Persistent-0.104.tar.gz print $upload->entered_by(), "\n"; # SUKRIA (Alexis Sukrieh)
Given the content of a CPAN upload email sent by PAUSE, this module will parse the content, and return an object which can be queried for the discrete bits of information about the upload.
The public API of this class exposes the following:
Parses given content of a CPAN upload email sent by PAUSE. Returns an object that can be queried on success and undef on failure. Newlines will be automatically normalized.
Returns the uploaded filename or URL. For example: "Coat-Persistent-0.104.tar.gz".
Returns the CPAN path of the upload. For example: "$CPAN/authors/id/S/SU/SUKRIA/Coat-Persistent-0.104.tar.gz".
Returns the size of the upload. For example: "24105".
Returns the MD5 checksum of the upload. For example: "5f84687ad671b675c6e2936c7b2b3fd7".
Returns the Perl author of the upload. For example: "SUKRIA (Alexis Sukrieh)".
Returns the datetime of upload. For example: "Fri, 05 Jun 2009 17:10:00 GMT".
Returns the datetime that paused completed servicing the upload. For example: "Fri, 05 Jun 2009 17:11:11 GMT".
Returns the version of paused that processed the upload. For example: "1047".
This module throws no exceptions. If the content is unparseable, the constructor, parse, will return undef.
This module does not employ any configuration nor environment variables.
No known incompatibilities.
Please report any issues to: http://github.com/afoxson/parse-pause/issues
Adam J. Foxson <firstname.lastname@example.org>
Copyright (C) 2009 Adam J. Foxson. All rights reserved.
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.