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