blib/lib/Dist/Zilla/Plugin/Test/Pod/Coverage/More.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 91.3% 21 / 23 CC 2 SCAR 3.5
CC
2
Cov
94%
register_prereqs
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« lib/Pod/Coverage/More/Declared/ClassTiny.pm ↑ Summary
1 # ABSTRACT: Add an author test that the POD of each module says what each sub takes, returns, and how it fails
2 # PODNAME: Dist::Zilla::Plugin::Test::Pod::Coverage::More
3  
4 package Dist::Zilla::Plugin::Test::Pod::Coverage::More 0.003;
5  
6 2 ▶use 5.036;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings FATAL => q{all};
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 extends 'Dist::Zilla::Plugin::InlineFiles';
11 2 with 'Dist::Zilla::Role::PrereqSource';
12  
13  
14 # Registers Test::Pod::Coverage::More as a requirement of development, as L<Dist::Zilla::Role::PrereqSource> asks,
15 # at the version of this plugin, which comes in the same distribution.
16 # @returns nothing
17 # @example $plugin->register_prereqs;
18 3 ▶sub register_prereqs {
Subroutine register_prereqs: called CC=2 SCAR=7.1
Pod documented
19 3 my ($self) = @_;
20 3 ▶ $self->zilla->register_prereqs( { type => 'requires', phase => 'develop' }, 'Test::Pod::Coverage::More' => __PACKAGE__->VERSION // 0 );
Condition50%1/2
__PACKAGE__->VERSION // 0
l!l
30
MC/DC0%0/1
__PACKAGE__->VERSION // 0
__PACKAGE__->VERSION
Truth table50%1/2
A
A= __PACKAGE__->VERSION
Aresult
11
00
21 3 return;
22 }
23  
24 2 __PACKAGE__->meta->make_immutable;
25  
26 2 1;
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 Dist::Zilla::Plugin::Test::Pod::Coverage::More - Add an author test that the POD of each module says what each sub takes, returns, and how it fails
35  
36 =head1 VERSION
37  
38 version 0.003
39  
40 =head1 SYNOPSIS
41  
42 # The test that the plugin adds, as xt/author/pod-coverage-more.t.
43 use Test::More;
44 use Test::Pod::Coverage::More;
45  
46 all_pod_coverage_more_ok();
47  
48 =head1 DESCRIPTION
49  
50 Adds F<xt/author/pod-coverage-more.t> to the distribution. The test runs
51 C<all_pod_coverage_more_ok> of L<Test::Pod::Coverage::More> over each module of the build.
52 So it fails for each public sub that the POD does not document,
53 and for each argument, type, return value and way to fail that the POD of a sub leaves out.
54  
55 It takes the place of C<[PodCoverageTests]>, which checks only that the POD names each sub.
56 In a bundle that includes that plugin, such as C<[@TestingMania]>, turn it off:
57  
58 [@TestingMania]
59 disable = PodCoverageTests
60  
61 A sub that a C<=for Pod::Coverage> line names counts as documented, as it does for C<[PodCoverageTests]>.
62  
63 With C<[Blurbs]> of L<Pod::Weaver::Section::Blurbs> in F<weaver.ini>, the build writes the POD of each sub
64 from the comment above it, and the test reads that POD.
65  
66 =head1 USAGE
67  
68 In F<dist.ini>:
69  
70 [Test::Pod::Coverage::More]
71  
72 and then run C<dzil test --author>, or C<dzil test --release>, which runs the author tests too.
73  
74 =head1 METHODS
75  
76 =head2 register_prereqs
77  
78 Registers Test::Pod::Coverage::More as a requirement of development, as L<Dist::Zilla::Role::PrereqSource> asks, at the version of this plugin, which comes in the same distribution.
79  
80 Returns nothing.
81  
82 $plugin->register_prereqs;
83  
84 =head1 SEE ALSO
85  
86 Please see those modules/websites for more information related to this module.
87  
88 =over 4
89  
90 =item *
91  
92 L<Pod::Coverage::More|Pod::Coverage::More>
93  
94 =item *
95  
96 L<Test::Pod::Coverage::More>
97  
98 =item *
99  
100 L<Dist::Zilla::Plugin::PodCoverageTests>
101  
102 =back
103  
104 =head1 BUGS
105  
106 Please report any bugs or feature requests on the bugtracker website
107 L<https://github.com/teodesian/Pod-Coverage-More/issues>
108  
109 When submitting a bug or request, please include a test-file or a
110 patch to an existing test-file that illustrates the bug or desired
111 feature.
112  
113 =head1 AUTHORS
114  
115 Current Maintainers:
116  
117 =over 4
118  
119 =item *
120  
121 George S. Baugh <teodesian@cpan.org>
122  
123 =back
124  
125 =head1 COPYRIGHT AND LICENSE
126  
127 Copyright (c) 2014-2026 George S. Baugh
128  
129  
130 Permission is hereby granted, free of charge, to any person obtaining a copy
131 of this software and associated documentation files (the "Software"), to deal
132 in the Software without restriction, including without limitation the rights
133 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
134 copies of the Software, and to permit persons to whom the Software is
135 furnished to do so, subject to the following conditions:
136 The above copyright notice and this permission notice shall be included in all
137 copies or substantial portions of the Software.
138 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
139 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
140 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
141 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
142 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
143 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
144 SOFTWARE.
145  
146 =cut
147  
148 __DATA__
« lib/Pod/Coverage/More/Declared/ClassTiny.pm ↑ Summary