CPAN::Testers::WWW::Reports::Query::AJAX - Get specific CPAN Testers results
my $query = CPAN::Testers::WWW::Reports::Query::AJAX->new( dist => 'App-Maisha', version => '0.12', # optional, will default to latest version ); # basic results printf "ALL: %d\n" . "PASS: %d\n" . "FAIL: %d\n" . "NA: %d\n" . "UNKNOWN: %d\n" . "%age PASS: %d\n" . "%age FAIL: %d\n" . "%age NA: %d\n" . "%age UNKNOWN: %d\n", $query->all, $query->pass, $query->fail, $query->na, $query->unknown, $query->pc_pass, $query->pc_fail, $query->pc_na, $query->pc_unknown; # get the raw data for all results, or a specific version if supplied my $data = $query->raw; # basic filters (see new() for details) my $query = CPAN::Testers::WWW::Reports::Query::AJAX->new( dist => 'App-Maisha', version => '0.12', osname => 'Win32', patches => 1, perlmat => 1, perlver => '5.10.0', format => 'xml' # xml is default, text also supported ); printf "Win32 PASS: %d\n", $query->pass;
This module queries the CPAN Testers website (via the AJAX interface) and retrieves a simple data set of results. It then parses these to answer a few simple questions.
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.
Available parameters are
item * dist (required)
The distribution to provide a summary for. An error will be returned if no distribution name is provided.
item * version (optional)
Filter based on a specific distribution version. Defaults to the latest version.
item * perlmat (optional)
Filter based on perl maturity, i.e. whether a development version (5.21.3) or a stable version (5.20.1). Values are:
- 0 = all reports =item * 1 = stable versions only =item * 2 = development versions only
item * patches (optional)
Filter based on whether the perl version is a patch. Values are:
- 0 = all reports =item * 1 = patches only =item * 2 = exclude patches
Defaults to all reports.
item * perlver (optional)
Filter based on Perl version, e.g. 5.20.1. Defaults to all versions.
item * osname (optional)
Filter based on Operating System name, e.g. MSWin32. Defaults to all Operating Systems.
item * format (optional)
Available formats are: 'csv', 'html' and 'xml'. Defaults to 'html'.
Returns 1 if request succeeded, otherwise 0.
Returns the error if the request was unsuccessful.
For the given query, the total number of reports stored.
For the given query, the total number of PASS reports stored.
For the given query, the total number of FAIL reports stored.
For the given query, the total number of NA reports stored.
For the given query, the total number of UNKNOWN reports stored.
For the given query, the percentage number of PASS reports stored against all reports stored.
For the given query, the percentage number of FAIL reports stored against all reports stored.
For the given query, the percentage number of NA reports stored against all reports stored.
For the given query, the percentage number of UNKNOWN reports stored against all reports stored.
Returns the basic data structure as a hash reference. If a version is passed as a parameter, the data only for that version is returned. Otherwise all the results are returned, with the version as the top level key of the hash.
Returns the raw content returned from the server.
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.
I would also like to thank Leo Lapworth from prompting me to write this, sorry its taken so long to release. However, you may be interested in his alternative query distribution CPAN::Testers::Reports::Query::JSON.
Initially released during the 2012 QA Hackathon in Paris.
CPAN Testers wouldn't exist without the help and support of the Perl community. However, since 2008 CPAN Testers has grown far beyond the expectations of it's original creators. As a consequence it now requires considerable funding to help support the infrastructure.
In early 2012 the Enlightened Perl Organisation very kindly set-up a CPAN Testers Fund within their donatation structure, to help the project cover the costs of servers and services.
If you would like to donate to the CPAN Testers Fund, please follow the link below to the Enlightened Perl Organisation's donation site.
If your company would like to support us, you can donate financially via the fund link above, or if you have servers or services that we might use, please send an email to firstname.lastname@example.org with details.
Our full list of current sponsors can be found at our I <3 CPAN Testers site.
Barbie, <email@example.com> for Miss Barbell Productions <http://www.missbarbell.co.uk>.
Copyright (C) 2011-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.