CPAN::Testers::WWW::Reports::Query::Report - Retrieve CPAN Testers report direct from the CPAN Testers website.
This module queries the CPAN Testers website and retrieves a specific report.
# default options my %options = ( as_json => 0, # the default as_hash => 0, # the default host => 'http://cpantesters.org' # the default ); # establish the object my $query = CPAN::Testers::WWW::Reports::Query::Report->new( %options );
The default is to return a Metabase::Fact, as a CPAN::Testers::Report object. If you wish to manipulate this differently, use the as_json or as_hash to return more simplified forms.
# get by id my $result = $query->report( report => 40000000 ); # get by GUID $result = $query->report( report => '0b3fd09a-7e50-11e3-9609-5744ee331862' ); # force return as JSON my $result = $query->report( report => 40000000, as_json => 1 ); # force return as a hash my $result = $query->report( report => 40000000, as_hash => 1 );
The as_json and as_hash options here will override the general options supplied in the object constructor. If you've specified as_json or as_hash in the object constructor, to override simply set 'as_json => 0' and/or 'as_hash => 0' in the method call.
# get the last error my $error = $query->error;
If the result is returned as undef, either no report was found or the JSON return is malformed. This could be due to network connection, or corrupt data in the report. If the latter please notify the CPAN Testers discussion list, so we can investigate and correct as appropriate.
new
Instatiates the object CPAN::WWW::Testers::Reports::Query::Report. Can take options to define whether a hash or json is required on return.
report
For the given id or GUID, returns a hash or JSON describing the specified test report.
error
Returns the last recorded error.
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.
RT Queue - http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN::Testers::WWW::Reports::Query::Report
CPAN::Testers::Data::Generator, CPAN::Testers::WWW::Reports
http://www.cpantesters.org/, http://stats.cpantesters.org/, http://wiki.cpantesters.org/
Initially written during the 2014 QA Hackathon in Lyon.
Barbie, <barbie@cpan.org> for Miss Barbell Productions <http://www.missbarbell.co.uk>.
Copyright (C) 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.
To install CPAN::Testers::WWW::Reports::Query::Report, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Testers::WWW::Reports::Query::Report
CPAN shell
perl -MCPAN -e shell install CPAN::Testers::WWW::Reports::Query::Report
For more information on module installation, please visit the detailed CPAN module installation guide.