The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CPAN::Testers::Data::Addresses - CPAN Testers Addresses Database Manager

SYNOPSIS

  perl addresses.pl \
        [--verbose|v] --config|c=<file> \
        ( [--help|h] \
        | [--update=<file>] \
        | [--reindex] [--lastid=<num>] \
        | [--clean] \
        | [--backup] \
        | [--mailrc|m=<file>] [--month=<string>] [--match] ) \
        [--logfile=<file>] [--logclean=(0|1)]

DESCRIPTION

This program allows the user to update the tester addresses database, or search it, based on a restricted set of criteria.

SCHEMA

The schema for the MySQL database is below:

    CREATE TABLE `ixaddress` (
      `id` int(10) unsigned NOT NULL,
      `guid` varchar(40) NOT NULL DEFAULT '',
      `addressid` int(10) unsigned NOT NULL,
      `fulldate` varchar(32) DEFAULT NULL,
      PRIMARY KEY (`id`,`guid`),
      KEY `IXGUID` (`guid`),
      KEY `IXADDR` (`addressid`)
    ) ENGINE=MyISAM;

    CREATE TABLE `tester_address` (
      `addressid` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `testerid` int(10) unsigned NOT NULL DEFAULT '0',
      `address` varchar(255) NOT NULL,
      `email` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`addressid`),
      KEY `IXTESTER` (`testerid`),
      KEY `IXADDRESS` (`address`)
    ) ENGINE=MyISAM DEFAULT CHARSET UTF8;

    CREATE TABLE `tester_profile` (
      `testerid` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(255) DEFAULT NULL,
      `pause` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`testerid`),
      KEY `IXNAME` (`name`),
      KEY `IXPAUSE` (`pause`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

The address field is the same as the tester field in the cpanstats table, while the email field is the extracted email address field only.

INTERFACE

The Constructor

  • new

    Instatiates the object CPAN::Testers::Data::Addresses:

      my $obj = CPAN::Testers::Data::Addresses->new();

Public Methods

  • process

    Based on accessor settings will run the appropriate methods for the current execution.

  • search

    Search the tables for unmapped entries, suggesting appropriate mappings.

  • update

    Updates the tester_profiles and tester_address entries as defined by the reference source text file.

  • reindex

    Indexes the ixaddress table, updating the tester_address table if appropriate.

  • clean

    De-duplicates addresses.

  • backup

    Provides backup files of the uploads database.

Accessor Methods

  • logfile

    Path to output log file for progress and debugging messages.

  • logclean

    If set to a true value will create/overwrite the logfile, otherwise will append any messages.

  • lastfile

    Path to the file containing the last cpanstats record ID processed.

Internal Methods

load_addresses

Loads all the data files with addresses against we can match, then load all the addresses listed in the DB that we need to match against.

match_addresses

Given all the possible mappings, attempts to match unmapped addresses.

Prints the suggested mappings, and those remaining unmapped addresses.

map_address

Atempts to map an address to a known CPAN author, then to one that already exists in the database, and finally to one that is known within the CPAN Authors index.

map_domain

Attempts to map an address based on its domain.

map_name

Attempts to map any name listed in the address to a tester profile.

Private Methods

  • _lastid

    Sets or returns the last cpanstats record ID processed.

  • _extract_email

    Extracts an email from a text string.

  • _init_options

    Initialises internal configuration settings based on command line options, API options and configuration file settings.

  • _help

    Provides a help screen.

  • _log

    Writes audit messages to a log file.

BECOME A TESTER

Whether you have a common platform or a very unusual one, you can help by testing modules you install and submitting reports. There are plenty of module authors who could use test reports and helpful feedback on their modules and distributions.

If you'd like to get involved, please take a look at the CPAN Testers Wiki, where you can learn how to install and configure one of the recommended smoke tools.

For further help and advice, please subscribe to the the CPAN Testers discussion mailing list.

  CPAN Testers Wiki
    - http://wiki.cpantesters.org
  CPAN Testers Discuss mailing list
    - http://lists.cpan.org/showlist.cgi?name=cpan-testers-discuss

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 an email to barbie@cpan.org. However, it would help greatly if you are able to pinpoint problems or even supply a patch.

Fixes are dependent upon their severity and my availability. 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-Data-Addresses

SEE ALSO

CPAN::Testers::Data::Generator, CPAN::Testers::WWW::Statistics

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

AUTHOR

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

COPYRIGHT AND LICENSE

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

  This module is free software; you can redistribute it and/or
  modify it under the Artistic License 2.0.