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

BUGS

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

SUPPORT

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

AUTHOR

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

ACKNOWLEDGEMENTS

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