Leo Lapworth

NAME

  CPAN::Testers::Reports::Query::JSON - Find out about a distributions cpantesters results
  

SYNOPSIS

    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');
  

DESCRIPTION

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.

all()

Get stats on all tests, returns a CPAN::Testers::Reports::Query::JSON::Set object.

win32_only()

Returns a CPAN::Testers::Reports::Query::JSON::Set object for win32 only test results. 'MSWin32' and 'cygwin' are osnames.

non_win32()

Non windows, returns a CPAN::Testers::Reports::Query::JSON::Set object.

for_os()

  my $report = $dist_query->for_os('linux');
  

Returns a CPAN::Testers::Reports::Query::JSON::Set object for the specified OS.

current_version()

  my $current_version = $query->current_version();

Returns the latest version available

AUTHOR

Leo Lapworth, LLAP@cuckoo.org

BUGS

None that I'm aware of - export may not encode correctly.

Repository (git)

http://github.com/ranguard/cpan-testers-reports-query-json, git://github.com/ranguard/cpan-testers-reports-query-json.git

COPYRIGHT

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.