1Coverage(3)           User Contributed Perl Documentation          Coverage(3)
2
3
4

NAME

6       Test::Pod::Coverage - Check for pod coverage in your distribution.
7

VERSION

9       Version 1.08
10

SYNOPSIS

12       Checks for POD coverage in files for your distribution.
13
14           use Test::Pod::Coverage tests=>1;
15           pod_coverage_ok( "Foo::Bar", "Foo::Bar is covered" );
16
17       Can also be called with Pod::Coverage parms.
18
19           use Test::Pod::Coverage tests=>1;
20           pod_coverage_ok(
21               "Foo::Bar",
22               { also_private => [ qr/^[A-Z_]+$/ ], },
23               "Foo::Bar, with all-caps functions as privates",
24           );
25
26       The Pod::Coverage parms are also useful for subclasses that don't re-
27       document the parent class's methods.  Here's an example from Mail::SRS.
28
29           pod_coverage_ok( "Mail::SRS" ); # No exceptions
30
31           # Define the three overridden methods.
32           my $trustme = { trustme => [qr/^(new⎪parse⎪compile)$/] };
33           pod_coverage_ok( "Mail::SRS::DB", $trustme );
34           pod_coverage_ok( "Mail::SRS::Guarded", $trustme );
35           pod_coverage_ok( "Mail::SRS::Reversable", $trustme );
36           pod_coverage_ok( "Mail::SRS::Shortcut", $trustme );
37
38       Alternately, you could use Pod::Coverage::CountParents, which always
39       allows a subclass to reimplement its parents' methods without redocu‐
40       menting them.  For example:
41
42           my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
43           pod_coverage_ok( "IO::Handle::Frayed", $trustparents );
44
45       (The "coverage_class" parameter is not passed to the coverage class
46       with other parameters.)
47
48       If you want POD coverage for your module, but don't want to make
49       Test::Pod::Coverage a prerequisite for installing, create the following
50       as your t/pod-coverage.t file:
51
52           use Test::More;
53           eval "use Test::Pod::Coverage";
54           plan skip_all => "Test::Pod::Coverage required for testing pod coverage" if $@;
55
56           plan tests => 1;
57           pod_coverage_ok( "Pod::Master::Html");
58
59       Finally, Module authors can include the following in a t/pod-coverage.t
60       file and have "Test::Pod::Coverage" automatically find and check all
61       modules in the module distribution:
62
63           use Test::More;
64           eval "use Test::Pod::Coverage 1.00";
65           plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
66           all_pod_coverage_ok();
67

FUNCTIONS

69       All functions listed below are exported to the calling namespace.
70
71       all_pod_coverage_ok( [$parms, ] $msg )
72
73       Checks that the POD code in all modules in the distro have proper POD
74       coverage.
75
76       If the $parms hashref if passed in, they're passed into the "Pod::Cov‐
77       erage" object that the function uses.  Check the Pod::Coverage manual
78       for what those can be.
79
80       The exception is the "coverage_class" parameter, which specifies a
81       class to use for coverage testing.  It defaults to "Pod::Coverage".
82
83       pod_coverage_ok( $module, [$parms, ] $msg )
84
85       Checks that the POD code in $module has proper POD coverage.
86
87       If the $parms hashref if passed in, they're passed into the "Pod::Cov‐
88       erage" object that the function uses.  Check the Pod::Coverage manual
89       for what those can be.
90
91       The exception is the "coverage_class" parameter, which specifies a
92       class to use for coverage testing.  It defaults to "Pod::Coverage".
93
94       all_modules( [@dirs] )
95
96       Returns a list of all modules in $dir and in directories below. If no
97       directories are passed, it defaults to blib if blib exists, or lib if
98       not.
99
100       Note that the modules are as "Foo::Bar", not "Foo/Bar.pm".
101
102       The order of the files returned is machine-dependent.  If you want them
103       sorted, you'll have to sort them yourself.
104

BUGS

106       Please report any bugs or feature requests to "bug-test-pod-coverage at
107       rt.cpan.org", or through the web interface at
108       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Pod-Coverage>.  I
109       will be notified, and then you'll automatically be notified of progress
110       on your bug as I make changes.
111

SUPPORT

113       You can find documentation for this module with the perldoc command.
114
115           perldoc Test::Pod::Coverage
116
117       You can also look for information at:
118
119       * AnnoCPAN: Annotated CPAN documentation
120           <http://annocpan.org/dist/Test-Pod-Coverage>
121
122       * CPAN Ratings
123           <http://cpanratings.perl.org/d/Test-Pod-Coverage>
124
125       * RT: CPAN's request tracker
126           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Pod-Coverage>
127
128       * Search CPAN
129           <http://search.cpan.org/dist/Test-Pod-Coverage>
130

AUTHOR

132       Written by Andy Lester, "<andy at petdance.com>".
133

ACKNOWLEDGEMENTS

135       Thanks to Ricardo Signes for patches, and Richard Clamp for writing
136       Pod::Coverage.
137
139       Copyright 2006, Andy Lester, All Rights Reserved.
140
141       You may use, modify, and distribute this package under the same terms
142       as Perl itself.
143
144
145
146perl v5.8.8                       2006-01-25                       Coverage(3)
Impressum