File Coverage

blib/lib/CPAN/Cover/Results.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod n/a
total 12 15 80.0


line stmt bran cond sub pod time code
1             package CPAN::Cover::Results;
2             $CPAN::Cover::Results::VERSION = '0.02';
3 1     1   31153 use CPAN::Cover::Results::ReleaseIterator;
  1         4  
  1         43  
4              
5 1     1   28 use 5.006;
  1         4  
  1         41  
6 1     1   6 use Moo;
  1         2  
  1         6  
7             with 'MooX::Role::CachedURL'
8             # => { -version => 0.03 }
9             ;
10              
11             has '+url' =>
12             (
13             default => sub { 'http://cpancover.com/staging/cpancover.json' },
14             );
15              
16             sub release_iterator
17             {
18 0     0     my $self = shift;
19              
20 0           return CPAN::Cover::Results::ReleaseIterator->new( results => $self );
21             }
22              
23             1;
24              
25             =head1 NAME
26              
27             CPAN::Cover::Results - get CPAN coverage test results from CPAN Cover service
28              
29             =head1 SYNOPSIS
30              
31             use CPAN::Cover::Results;
32              
33             my $iterator = CPAN::Cover::Results->new()->iterator();
34              
35             while (my $release = $iterator->next) {
36             printf "%s (%s) : %.2f\n",
37             $release->distname, $dist->version,
38             $dist->total;
39             }
40              
41             =head1 DESCRIPTION
42              
43             This module will get the coverage test results from the
44             L
45             service and let you iterate over them, distribution by distribution.
46             CPAN Cover is a service that runs L
47             on as much of CPAN as possible,
48             and makes the results available.
49              
50             The release iterator returns instances of L,
51             which has the following attributes:
52              
53             =over 4
54              
55             =item * distname - the name of the distribution, as determined
56             by L.
57              
58             =item * version - the version number of the release.
59              
60             =item * branch - the branch coverage of the release's testsuite,
61             or C.
62              
63             =item * condition - the condition coverage figure, or C.
64              
65             =item * pod - the pod coverage, if available, or C.
66              
67             =item * statement - the statement coverage, or C.
68              
69             =item * subroutine - the subroutine coverage, or C.
70              
71             =item * total - the total coverage.
72              
73             =back
74              
75             See the L documentation for more information on the
76             different coverage figures.
77              
78             =head1 SEE ALSO
79              
80             L - the module used to generate test coverage statistics.
81              
82             L - the coverage testing service that
83             generates the results accessed via this module.
84              
85             L - slides from a talk by Paul Johnson, the author
86             of Devel::Cover and cpancover.
87              
88             L - the release iterator returns instances
89             of this class.
90              
91             =head1 REPOSITORY
92              
93             L
94              
95             =head1 AUTHOR
96              
97             Neil Bowers Eneilb@cpan.orgE
98              
99             =head1 COPYRIGHT AND LICENSE
100              
101             This software is copyright (c) 2014 by Neil Bowers .
102              
103             This is free software; you can redistribute it and/or modify it under
104             the same terms as the Perl 5 programming language system itself.
105              
106             =cut