1 .\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.10)
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
9 .de Vb \" Begin verbatim text
14 .de Ve \" End verbatim text
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
53 . tm Index:\\$1\t\\n%\t"\\$2"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
65 . \" fudge factors for nroff and troff
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 . \" simple accents for nroff and troff
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
97 . \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 . \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 . \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
124 .\" ========================================================================
127 .TH Pod 3 "2009-07-13" "perl v5.8.7" "User Contributed Perl Documentation"
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
133 Test::Pod \- check for POD errors in files
138 .IX Header "SYNOPSIS"
139 \&\f(CW\*(C`Test::Pod\*(C'\fR lets you check the validity of a \s-1POD\s0 file, and report
140 its results in standard \f(CW\*(C`Test::Simple\*(C'\fR fashion.
143 \& use Test::Pod tests => $num_tests;
144 \& pod_file_ok( $file, "Valid POD file" );
147 Module authors can include the following in a \fIt/pod.t\fR file and
148 have \f(CW\*(C`Test::Pod\*(C'\fR automatically find and check all \s-1POD\s0 files in a
153 \& eval "use Test::Pod 1.00";
154 \& plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
155 \& all_pod_files_ok();
158 You can also specify a list of files to check, using the
159 \&\f(CW\*(C`all_pod_files()\*(C'\fR function supplied:
164 \& eval "use Test::Pod 1.00";
165 \& plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
166 \& my @poddirs = qw( blib script );
167 \& all_pod_files_ok( all_pod_files( @poddirs ) );
170 Or even (if you're running under Apache::Test):
175 \& eval "use Test::Pod 1.00";
176 \& plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
178 \& my @poddirs = qw( blib script );
179 \& use File::Spec::Functions qw( catdir updir );
181 \& all_pod_files( map { catdir updir, $_ } @poddirs )
185 .IX Header "DESCRIPTION"
186 Check \s-1POD\s0 files for errors or warnings in a test file, using
187 \&\f(CW\*(C`Pod::Simple\*(C'\fR to do the heavy lifting.
189 .IX Header "FUNCTIONS"
190 .SS "pod_file_ok( FILENAME[, \s-1TESTNAME\s0 ] )"
191 .IX Subsection "pod_file_ok( FILENAME[, TESTNAME ] )"
192 \&\f(CW\*(C`pod_file_ok()\*(C'\fR will okay the test if the \s-1POD\s0 parses correctly. Certain
193 conditions are not reported yet, such as a file with no pod in it at all.
195 When it fails, \f(CW\*(C`pod_file_ok()\*(C'\fR will show any pod checking errors as
198 The optional second argument \s-1TESTNAME\s0 is the name of the test. If it
199 is omitted, \f(CW\*(C`pod_file_ok()\*(C'\fR chooses a default test name \*(L"\s-1POD\s0 test
200 for \s-1FILENAME\s0\*(R".
201 .SS "all_pod_files_ok( [@files/@directories] )"
202 .IX Subsection "all_pod_files_ok( [@files/@directories] )"
203 Checks all the files in \f(CW@files\fR for valid \s-1POD\s0. It runs
204 \&\fIall_pod_files()\fR on each file/directory, and calls the \f(CW\*(C`plan()\*(C'\fR
205 function for you (one test for each function), so you can't have
206 already called \f(CW\*(C`plan\*(C'\fR.
208 If \f(CW@files\fR is empty or not passed, the function finds all \s-1POD\s0
209 files in the \fIblib\fR directory if it exists, or the \fIlib\fR directory
210 if not. A \s-1POD\s0 file is one that ends with \fI.pod\fR, \fI.pl\fR and \fI.pm\fR,
211 or any file where the first line looks like a shebang line.
213 If you're testing a module, just make a \fIt/pod.t\fR:
217 \& eval "use Test::Pod 1.00";
218 \& plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
219 \& all_pod_files_ok();
222 Returns true if all pod files are ok, or false if any fail.
223 .SS "all_pod_files( [@dirs] )"
224 .IX Subsection "all_pod_files( [@dirs] )"
225 Returns a list of all the Perl files in \fI\f(CI$dir\fI\fR and in directories
226 below. If no directories are passed, it defaults to \fIblib\fR if
227 \&\fIblib\fR exists, or else \fIlib\fR if not. Skips any files in \s-1CVS\s0,
228 \&.svn, .git and similar directories. See \f(CW%Test::Pod::ignore_dirs\fR
233 Any file that ends in \fI.PL\fR, \fI.pl\fR, \fI.pm\fR, \fI.pod\fR or \fI.t\fR.
235 Any file that has a first line with a shebang and \*(L"perl\*(R" on it.
237 The order of the files returned is machine-dependent. If you want them
238 sorted, you'll have to sort them yourself.
241 \&\s-1STUFF\s0 \s-1TO\s0 \s-1DO\s0
243 Note the changes that are being made.
245 Note that you no longer can test for \*(L"no pod\*(R".
248 Currently maintained by Andy Lester, \f(CW\*(C`<andy at petdance.com>\*(C'\fR.
250 Originally by brian d foy.
251 .SH "ACKNOWLEDGEMENTS"
252 .IX Header "ACKNOWLEDGEMENTS"
258 for contributions and to \f(CW\*(C`brian d foy\*(C'\fR for the original code.
260 .IX Header "COPYRIGHT"
261 Copyright 2006\-2009, Andy Lester, All Rights Reserved.
263 You may use, modify, and distribute this package under the terms
264 as the Artistic License v2.0 or \s-1GNU\s0 Public License v2.0.