CPAN::Testers::Reports::Query::JSON - Find out about a distributions cpantesters results
my $dist_query = CPAN::Testers::Reports::Query::JSON->new( { distribution => 'Data::Pageset', version => '1.01', # optional, will default to latest version } ); print "Processing version: " . $dist_query->version() . "\n"; print "Other versions are: " . join(" ", @{$dist_query->versions()}) . "\n"; my $all = $dist_query->all(); printf "There were %s tests, %s passed, %s failed - e.g. %s percent", $all->total_tests(), $all->number_passed(), $all->number_failed(), $all->percent_passed(); my $win32_only = $dist_query->win32_only(); printf "There were %s windows tests, %s passed, %s failed - e.g. %s percent", $win32_only->total_tests(), $win32_only->number_passed(), $win32_only->number_failed(), $win32_only->percent_passed(); my $non_win32 = $dist_query->non_win32(); printf "There were %s windows tests, %s passed, %s failed - e.g. %s percent", $non_win32->total_tests(), $non_win32->number_passed(), $non_win32->number_failed(), $non_win32->percent_passed(); # Get results for a specific OS my $specific_os = $dist_query->for_os('linux');
This module queries the cpantesters website (via the JSON interface) and gets the test results back, it then parses these to answer a few simple questions.
This module only reports on versions of Perl which are unpatched.
Get stats on all tests, returns a CPAN::Testers::Reports::Query::JSON::Set object.
Returns a CPAN::Testers::Reports::Query::JSON::Set object for win32 only test results. 'MSWin32' and 'cygwin' are osnames.
Non windows, returns a CPAN::Testers::Reports::Query::JSON::Set object.
my $report = $dist_query->for_os('linux');
Returns a CPAN::Testers::Reports::Query::JSON::Set object for the specified OS.
my $current_version = $query->current_version();
Returns the latest version available
Leo Lapworth, LLAP@cuckoo.org
None that I'm aware of - export may not encode correctly.
http://github.com/ranguard/cpan-testers-reports-query-json, git://github.com/ranguard/cpan-testers-reports-query-json.git
Copyright (c) Leo Lapworth. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CPAN::Testers::Reports::Query::JSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Testers::Reports::Query::JSON
CPAN shell
perl -MCPAN -e shell install CPAN::Testers::Reports::Query::JSON
For more information on module installation, please visit the detailed CPAN module installation guide.