NAME
CPAN::Testers::Data::Uploads - CPAN Testers Uploads Database Generator
SYNOPSIS
perl uploads.pl --config=<file> [--generate] [--reindex] [--update] [--backup]
DESCRIPTION
This program allows the user to create, update and backup the uploads database, either as separate commands, or a combination of all three. The process order will always be CREATE->UPDATE->BACKUP, regardless of the order the options appear on the command line.
The Uploads database contains basic information about the history of CPAN. It records the release dates of everything that is uploaded to CPAN, both within a BACKPAN repository, a current CPAN repository and the latest uploads posted by PAUSE, which may not have yet reached the CPAN mirrors.
A simple schema for the MySQL database is below:
CREATE TABLE `uploads` (
`type` varchar(10) NOT NULL,
`author` varchar(32) NOT NULL,
`dist` varchar(100) NOT NULL,
`version` varchar(100) NOT NULL,
`filename` varchar(255) NOT NULL,
`released` int(16) NOT NULL,
PRIMARY KEY (`author`,`dist`,`version`)
) ENGINE=MyISAM;
The 'type' field can be one of three values, 'backpan', 'cpan' or 'upload', which incates whether the release has been archived to BACKPAN, currently on CPAN or has recently been uploaded and may not have reached the CPAN mirrors yet.
The 'author', 'dist', 'version' and 'filename' fields contain the breakdown of the distribution component parts used to locate the distribution. Although in most cases the filename could be considered a primary key, it is possible that two or more authors could upload a distribution with the same name.
The 'released' field holds the date of the distribution release as the number of seconds since the epoch. This is extremely useful for sorting distributions based on their release date rather than the version string. Due to many authors having different version schemes, this is perhaps the only reliable method with which to sort distribution releases.
INTERFACE
The Constructor
new
Instatiates the object CPAN::Testers::Data::Uploads:
my $obj = CPAN::Testers::Data::Uploads->new();
Public Methods
process
Based on accessor settings will run the appropriate methods for the current execution.
generate
Generates a new uploads and ixlatest database.
reindex
Rebuilds the ixlatest table for all entries.
update
Updates the uploads and ixlatest databases.
backup
Provides backup files of the uploads database.
help
Provides a help screen.
Accessor Methods
uploads
Database handle to the uploads database.
backpan
Path to the BACKPAN archive directory.
cpan
Path to the CPAN archive directory.
logfile
Path to output log file for progress and debugging messages. Default file: '_uploads.log'.
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 NNTPID processed. Default file: '_lastmail'.
journal
Path to the journal file. Default file: '_journal.sql'.
mgenerate
If set to a true value runs in generate mode for the process method().
mupdate
If set to a true value runs in update mode for the process method().
mbackup
If set to a true value runs in backup mode for the process method().
mreindex
If set to a true value runs in reindex mode for the process method().
Private Methods
_parse_archive
Parses the given article from the NNTP feed.
_update_index
Updates the ixlatest table and pushes requests to the page_request table.
_nntp_connect
Sets up the connection to the NNTP server.
_lastid
Sets or returns the last NNTPID processed.
_init_options
Initialises internal configuration settings based on command line options, API options and configuration file settings.
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-Uploads
SEE ALSO
CPAN::Testers::Data::Generate CPAN::Testers::WWW::Statistics
http://www.cpantesters.org/, http://stats.cpantesters.org/, http://wiki.cpantesters.org/
AUTHOR
Barbie, <barbie@cpan.org>
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
COPYRIGHT AND LICENSE
Copyright (C) 2008-2014 Barbie for Miss Barbell Productions.
This distribution is free software; you can redistribute it and/or
modify it under the Artistic Licence v2.