Parse::PAUSE - Parses CPAN upload emails sent by PAUSE
version 1.001
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:
parse
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.
upload
Returns the uploaded filename or URL. For example: "Coat-Persistent-0.104.tar.gz".
pathname
Returns the CPAN path of the upload. For example: "$CPAN/authors/id/S/SU/SUKRIA/Coat-Persistent-0.104.tar.gz".
size
Returns the size of the upload. For example: "24105".
md5
Returns the MD5 checksum of the upload. For example: "5f84687ad671b675c6e2936c7b2b3fd7".
entered_by
Returns the Perl author of the upload. For example: "SUKRIA (Alexis Sukrieh)".
entered_on
Returns the datetime of upload. For example: "Fri, 05 Jun 2009 17:10:00 GMT".
completed
Returns the datetime that paused completed servicing the upload. For example: "Fri, 05 Jun 2009 17:11:11 GMT".
paused_version
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.
Moose
Encode
Encode::Newlines
Module::Pluggable
Scalar::Util
No known incompatibilities.
Please report any issues to: http://github.com/afoxson/parse-pause/issues
Adam J. Foxson <afoxson@pobox.com>
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.
To install Parse::PAUSE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::PAUSE
CPAN shell
perl -MCPAN -e shell install Parse::PAUSE
For more information on module installation, please visit the detailed CPAN module installation guide.