CPAN::Testers::WWW::Reports::Mailer - CPAN Testers Reports Mailer
use CPAN::Testers::WWW::Reports::Mailer; my $mailer = CPAN::Testers::WWW::Reports::Mailer->new( config => 'myconfig.ini' ); $mailer->check_reports(); $mailer->check_counts();
The CPAN Testers Reports Mailer takes the preferences set within the CPANPREFS database, and uses them to filter out reports that the author does or does not wish to be made aware of.
New authors are added to the system as a report for their first reported distribution is submitted by a tester. Default settings are applied in the first instance, with the author able to update these via the preferences website.
Initially only a Daily Summary Report is available, in time a Weekly Summary Report and the individual reports will also be available.
Configuration for this application can occur via the command line, the API and the configuration file. Of them all, only the configuration file is required.
The configuration file should be in the INI style, with the section CPANPREFS describing the associated database access required. The general settings section, SETTINGS, is optional, and can be overridden by the command line and the API arguments.
The CPANPREFS section is required, and should contain the following key/value pairs to describe access to the specific database.
Only 'driver' and 'database' are required for an SQLite database, while the other key/values may need to be completed for other databases.
It is now assumed that only one database connection is require, with other databases held within the same database application. The primary connection must be to the CPAN Preferences databases. The other databases, CPAN Statistics, Articles and Metabase
The following options are available, in the configuration file, on the command line and via the API call to new() as a hash.
Processing mode required. This can be one of three values, 'daily', 'weekly' or 'reports'. 'daily' and 'weekly' create the mails for the Daily Summary and Weekly Summary reports respectively. 'reports' creates individual report mails for authors.
If set to a true value, will print additional log messages.
By default this is set to 1, to avoid accidentally running and sending lots of mails :) Set to 0 to allow normal processing.
If used, must be set to a single NNTPID, which will then be tested in isolation for the currently set mode. Automatically sets the nomail flag to true.
The location of the counter file, that stores the ids of the last reports processed.
The location of the 01mailrc.txt file stored locally. By default the location is assumed to be 'data/01mailrc.txt'. If the confirguration is not set, or the file cannot be found, it will be dynamically downloaded from CPAN.
The location of the logfile. If not provided, logging is disabled.
By default this is set to 0, append to existing log. If set to 1, will create a new log or overwrite any existing log, on the first call to log a message, then will automatically reset to 0, so as to append any further messages.
Instatiates the object CPAN::WWW::Testers. Requires a hash of parameters, with 'config' being the only mandatory key. Note that 'config' can be anything that Config::IniFiles accepts for the -file option.
The core method that analyses the reports and constructs the mails.
Prints a summary of the processing.
Using the command line option, --help or -h, displays a help screen with instructions of the command line arguments. See the Configuration section for further details.
Path to the file containing the last NNTPID processed.
Provides the current verbose configuration setting.
Provides the current nomail configuration setting.
Provides a single test ID, if not all NNTPIDs need testing.
Path to output log file for progress and debugging messages.
If set to a true value will create/overwrite the logfile, otherwise will append any messages.
Provides the current mode being executed.
Path to the 01mailrc.txt file.
Provides the Template Toolkit object.
Provides the Parse::CPAN::Authors object.
Returns the last NNTPID processed for the current mode.
Sets the given NNTPID for the current mode.
Returns the author of a given distribution/version.
Returns the author preferences.
Parse a preferences record and returns a hash instance.
Repackages a report as an email for an individual author.
Composes and sends a mail message.
Returns an RFC 2822 compliant formatted date string.
Downloads and/or reads a copy of the 01mailrc.txt file.
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send bug reports and patches to the RT Queue (see below).
Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me.
Barbie, <email@example.com> for Miss Barbell Productions, http://www.missbarbell.co.uk/
Copyright (C) 2008-2012 Barbie for Miss Barbell Productions. This module is free software; you can redistribute it and/or modify it under the Artistic License 2.0.