NAME

CPAN::Testers::WWW::Reports::Mailer - CPAN Testers Reports Mailer

SYNOPSIS

use CPAN::Testers::WWW::Reports::Mailer;

my $mailer = CPAN::Testers::WWW::Reports::Mailer->new(
  config => 'myconfig.ini'
);

$mailer->check_reports();
$mailer->check_counts();

DESCRIPTION

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

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 sections CPANSTATS and 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.

Database Configuration

The CPANSTATS and CPANPREFS sections are required, and should contain the following key/value pairs to describe access to the specific database.

  • driver

  • database

  • dbhost

  • dbport

  • dbuser

  • dbpass

Only 'driver' and 'database' are required for an SQLite database, while the other key/values may need to be completed for other databases.

General Configuration

The following options are available, in the configuration file, on the command line and via the API call to new() as a hash.

  • debug

    By default this is set to 1, to avoid accidentally running and sending lots of mails :) Set to 0 to allow normal processing.

  • lastmail

    The location of the counter file, that stores the ids of the last reports processed.

  • mailrc

    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.

  • logfile

    The location of the logfile. If not provided, logging is disabled.

  • logclean

    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.

  • mode

    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.

INTERFACE

The Constructor

  • new

    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.

Methods

  • check_reports

    The core method that analyses the reports and constructs the mails.

  • check_counts

    Prints a summary of the processing.

  • help

    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.

Internal Methods

  • _get_lastid

  • _get_author

  • _get_prefs

  • _parse_prefs

  • _write_mail

  • _emaildate

  • _download_mailrc

SEE ALSO

CPAN::WWW::Testers::Generator CPAN::WWW::Testers CPAN::Testers::WWW::Statistics

http://www.cpantesters.org/, http://stats.cpantesters.org/, http://wiki.cpantesters.org/

BUGS, PATCHES & FIXES

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 dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.

RT Queue - http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Reports-Mailer

AUTHOR

Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/

COPYRIGHT & LICENSE

Copyright (C) 2008-2009 Barbie for Miss Barbell Productions.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.