.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Pod::Checker 3"
.TH Pod::Checker 3 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
Pod::Checker, podchecker() \- check pod documents for syntax errors
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use Pod::Checker;
.Ve
.PP
.Vb 1
\& $syntax_okay = podchecker($filepath, $outputpath, %options);
.Ve
.PP
.Vb 2
\& my $checker = new Pod::Checker %options;
\& $checker->parse_from_file($filepath, \e*STDERR);
.Ve
.SH "OPTIONS/ARGUMENTS"
.IX Header "OPTIONS/ARGUMENTS"
\&\f(CW$filepath\fR is the input \s-1POD\s0 to read and \f(CW$outputpath\fR is
where to write \s-1POD\s0 syntax error messages. Either argument may be a scalar
indicating a file\-path, or else a reference to an open filehandle.
If unspecified, the input-file it defaults to \f(CW\*(C`\e*STDIN\*(C'\fR, and
the output-file defaults to \f(CW\*(C`\e*STDERR\*(C'\fR.
.Sh "\fIpodchecker()\fP"
.IX Subsection "podchecker()"
This function can take a hash of options:
.IP "\fB\-warnings\fR => \fIval\fR" 4
.IX Item "-warnings => val"
Turn warnings on/off. \fIval\fR is usually 1 for on, but higher values
trigger additional warnings. See \*(L"Warnings\*(R".
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBpodchecker\fR will perform syntax checking of Perl5 \s-1POD\s0 format documentation.
.PP
\&\fI\s-1NOTE\s0 \s-1THAT\s0 \s-1THIS\s0 \s-1MODULE\s0 \s-1IS\s0 \s-1CURRENTLY\s0 \s-1IN\s0 \s-1THE\s0 \s-1BETA\s0 \s-1STAGE\s0!\fR
.PP
It is hoped that curious/ambitious user will help flesh out and add the
additional features they wish to see in \fBPod::Checker\fR and \fBpodchecker\fR
and verify that the checks are consistent with perlpod.
.PP
The following checks are currently preformed:
.IP "\(bu" 4
Unknown '=xxxx' commands, unknown 'X<...>' interior\-sequences,
and unterminated interior sequences.
.IP "\(bu" 4
Check for proper balancing of \f(CW\*(C`=begin\*(C'\fR and \f(CW\*(C`=end\*(C'\fR. The contents of such
a block are generally ignored, i.e. no syntax checks are performed.
.IP "\(bu" 4
Check for proper nesting and balancing of \f(CW\*(C`=over\*(C'\fR, \f(CW\*(C`=item\*(C'\fR and \f(CW\*(C`=back\*(C'\fR.
.IP "\(bu" 4
Check for same nested interior-sequences (e.g.
\&\f(CW\*(C`L<...L<...>...>\*(C'\fR).
.IP "\(bu" 4
Check for malformed or nonexisting entities \f(CW\*(C`E<...>\*(C'\fR.
.IP "\(bu" 4
Check for correct syntax of hyperlinks \f(CW\*(C`L<...>\*(C'\fR. See perlpod
for details.
.IP "\(bu" 4
Check for unresolved document-internal links. This check may also reveal
misspelled links that seem to be internal links but should be links
to something else.
.SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS"
.Sh "Errors"
.IX Subsection "Errors"
.IP "\(bu empty =headn" 4
.IX Item "empty =headn"
A heading (\f(CW\*(C`=head1\*(C'\fR or \f(CW\*(C`=head2\*(C'\fR) without any text? That ain't no
heading!
.IP "\(bu =over on line \fIN\fR without closing =back" 4
.IX Item "=over on line N without closing =back"
The \f(CW\*(C`=over\*(C'\fR command does not have a corresponding \f(CW\*(C`=back\*(C'\fR before the
next heading (\f(CW\*(C`=head1\*(C'\fR or \f(CW\*(C`=head2\*(C'\fR) or the end of the file.
.IP "\(bu =item without previous =over" 4
.IX Item "=item without previous =over"
.PD 0
.IP "\(bu =back without previous =over" 4
.IX Item "=back without previous =over"
.PD
An \f(CW\*(C`=item\*(C'\fR or \f(CW\*(C`=back\*(C'\fR command has been found outside a
\&\f(CW\*(C`=over\*(C'\fR/\f(CW\*(C`=back\*(C'\fR block.
.IP "\(bu No argument for =begin" 4
.IX Item "No argument for =begin"
A \f(CW\*(C`=begin\*(C'\fR command was found that is not followed by the formatter
specification.
.IP "\(bu =end without =begin" 4
.IX Item "=end without =begin"
A standalone \f(CW\*(C`=end\*(C'\fR command was found.
.IP "\(bu Nested =begin's" 4
.IX Item "Nested =begin's"
There were at least two consecutive \f(CW\*(C`=begin\*(C'\fR commands without
the corresponding \f(CW\*(C`=end\*(C'\fR. Only one \f(CW\*(C`=begin\*(C'\fR may be active at
a time.
.IP "\(bu =for without formatter specification" 4
.IX Item "=for without formatter specification"
There is no specification of the formatter after the \f(CW\*(C`=for\*(C'\fR command.
.IP "\(bu unresolved internal link \fI\s-1NAME\s0\fR" 4
.IX Item "unresolved internal link NAME"
The given link to \fI\s-1NAME\s0\fR does not have a matching node in the current
\&\s-1POD\s0. This also happend when a single word node name is not enclosed in
\&\f(CW""\fR.
.ie n .IP "\(bu Unknown command ""\fI\s-1CMD\s0\fR""" 4
.el .IP "\(bu Unknown command ``\fI\s-1CMD\s0\fR''" 4
.IX Item "Unknown command ""CMD"""
An invalid \s-1POD\s0 command has been found. Valid are \f(CW\*(C`=head1\*(C'\fR, \f(CW\*(C`=head2\*(C'\fR,
\&\f(CW\*(C`=head3\*(C'\fR, \f(CW\*(C`=head4\*(C'\fR, \f(CW\*(C`=over\*(C'\fR, \f(CW\*(C`=item\*(C'\fR, \f(CW\*(C`=back\*(C'\fR, \f(CW\*(C`=begin\*(C'\fR, \f(CW\*(C`=end\*(C'\fR,
\&\f(CW\*(C`=for\*(C'\fR, \f(CW\*(C`=pod\*(C'\fR, \f(CW\*(C`=cut\*(C'\fR
.ie n .IP "\(bu Unknown interior-sequence ""\fI\s-1SEQ\s0\fR""" 4
.el .IP "\(bu Unknown interior-sequence ``\fI\s-1SEQ\s0\fR''" 4
.IX Item "Unknown interior-sequence ""SEQ"""
An invalid markup command has been encountered. Valid are:
\&\f(CW\*(C`B<>\*(C'\fR, \f(CW\*(C`C<>\*(C'\fR, \f(CW\*(C`E<>\*(C'\fR, \f(CW\*(C`F<>\*(C'\fR,
\&\f(CW\*(C`I<>\*(C'\fR, \f(CW\*(C`L<>\*(C'\fR, \f(CW\*(C`S<>\*(C'\fR, \f(CW\*(C`X<>\*(C'\fR,
\&\f(CW\*(C`Z<>\*(C'\fR
.IP "\(bu nested commands \fI\s-1CMD\s0\fR<...\fI\s-1CMD\s0\fR<...>...>" 4
.IX Item "nested commands CMD<...CMD<...>...>"
Two nested identical markup commands have been found. Generally this
does not make sense.
.IP "\(bu garbled entity \fI\s-1STRING\s0\fR" 4
.IX Item "garbled entity STRING"
The \fI\s-1STRING\s0\fR found cannot be interpreted as a character entity.
.IP "\(bu Entity number out of range" 4
.IX Item "Entity number out of range"
An entity specified by number (dec, hex, oct) is out of range (1\-255).
.IP "\(bu malformed link L<>" 4
.IX Item "malformed link L<>"
The link found cannot be parsed because it does not conform to the
syntax described in perlpod.
.IP "\(bu nonempty Z<>" 4
.IX Item "nonempty Z<>"
The \f(CW\*(C`Z<>\*(C'\fR sequence is supposed to be empty.
.IP "\(bu empty X<>" 4
.IX Item "empty X<>"
The index entry specified contains nothing but whitespace.
.IP "\(bu Spurious text after =pod / =cut" 4
.IX Item "Spurious text after =pod / =cut"
The commands \f(CW\*(C`=pod\*(C'\fR and \f(CW\*(C`=cut\*(C'\fR do not take any arguments.
.IP "\(bu Spurious character(s) after =back" 4
.IX Item "Spurious character(s) after =back"
The \f(CW\*(C`=back\*(C'\fR command does not take any arguments.
.Sh "Warnings"
.IX Subsection "Warnings"
These may not necessarily cause trouble, but indicate mediocre style.
.IP "\(bu multiple occurrence of link target \fIname\fR" 4
.IX Item "multiple occurrence of link target name"
The \s-1POD\s0 file has some \f(CW\*(C`=item\*(C'\fR and/or \f(CW\*(C`=head\*(C'\fR commands that have
the same text. Potential hyperlinks to such a text cannot be unique then.
.IP "\(bu line containing nothing but whitespace in paragraph" 4
.IX Item "line containing nothing but whitespace in paragraph"
There is some whitespace on a seemingly empty line. \s-1POD\s0 is very sensitive
to such things, so this is flagged. \fBvi\fR users switch on the \fBlist\fR
option to avoid this problem.
.IP "\(bu previous =item has no contents" 4
.IX Item "previous =item has no contents"
There is a list \f(CW\*(C`=item\*(C'\fR right above the flagged line that has no
text contents. You probably want to delete empty items.
.IP "\(bu preceding non-item paragraph(s)" 4
.IX Item "preceding non-item paragraph(s)"
A list introduced by \f(CW\*(C`=over\*(C'\fR starts with a text or verbatim paragraph,
but continues with \f(CW\*(C`=item\*(C'\fRs. Move the non-item paragraph out of the
\&\f(CW\*(C`=over\*(C'\fR/\f(CW\*(C`=back\*(C'\fR block.
.IP "\(bu =item type mismatch (\fIone\fR vs. \fItwo\fR)" 4
.IX Item "=item type mismatch (one vs. two)"
A list started with e.g. a bulletted \f(CW\*(C`=item\*(C'\fR and continued with a
numbered one. This is obviously inconsistent. For most translators the
type of the \fIfirst\fR \f(CW\*(C`=item\*(C'\fR determines the type of the list.
.ie n .IP "\(bu \fIN\fR unescaped ""<>"" in paragraph" 4
.el .IP "\(bu \fIN\fR unescaped \f(CW<>\fR in paragraph" 4
.IX Item "N unescaped <> in paragraph"
Angle brackets not written as \f(CW\*(C`<lt>\*(C'\fR and \f(CW\*(C`<gt>\*(C'\fR
can potentially cause errors as they could be misinterpreted as
markup commands. This is only printed when the \-warnings level is
greater than 1.
.IP "\(bu Unknown entity" 4
.IX Item "Unknown entity"
A character entity was found that does not belong to the standard
\&\s-1ISO\s0 set or the \s-1POD\s0 specials \f(CW\*(C`verbar\*(C'\fR and \f(CW\*(C`sol\*(C'\fR.
.IP "\(bu No items in =over" 4
.IX Item "No items in =over"
The list opened with \f(CW\*(C`=over\*(C'\fR does not contain any items.
.IP "\(bu No argument for =item" 4
.IX Item "No argument for =item"
\&\f(CW\*(C`=item\*(C'\fR without any parameters is deprecated. It should either be followed
by \f(CW\*(C`*\*(C'\fR to indicate an unordered list, by a number (optionally followed
by a dot) to indicate an ordered (numbered) list or simple text for a
definition list.
.IP "\(bu empty section in previous paragraph" 4
.IX Item "empty section in previous paragraph"
The previous section (introduced by a \f(CW\*(C`=head\*(C'\fR command) does not contain
any text. This usually indicates that something is missing. Note: A
\&\f(CW\*(C`=head1\*(C'\fR followed immediately by \f(CW\*(C`=head2\*(C'\fR does not trigger this warning.
.IP "\(bu Verbatim paragraph in \s-1NAME\s0 section" 4
.IX Item "Verbatim paragraph in NAME section"
The \s-1NAME\s0 section (\f(CW\*(C`=head1 NAME\*(C'\fR) should consist of a single paragraph
with the script/module name, followed by a dash `\-' and a very short
description of what the thing is good for.
.Sh "Hyperlinks"
.IX Subsection "Hyperlinks"
There are some warnings wrt. malformed hyperlinks.
.IP "\(bu ignoring leading/trailing whitespace in link" 4
.IX Item "ignoring leading/trailing whitespace in link"
There is whitespace at the beginning or the end of the contents of
L<...>.
.IP "\(bu (section) in '$page' deprecated" 4
.IX Item "(section) in '$page' deprecated"
There is a section detected in the page name of L<...>, e.g.
\&\f(CW\*(C`L<passwd(2)>\*(C'\fR. \s-1POD\s0 hyperlinks may point to \s-1POD\s0 documents only.
Please write \f(CW\*(C`C<passwd(2)>\*(C'\fR instead. Some formatters are able
to expand this to appropriate code. For links to (builtin) functions,
please say \f(CW\*(C`L<perlfunc/mkdir>\*(C'\fR, without ().
.IP "\(bu alternative text/node '%s' contains non-escaped | or /" 4
.IX Item "alternative text/node '%s' contains non-escaped | or /"
The characters \f(CW\*(C`|\*(C'\fR and \f(CW\*(C`/\*(C'\fR are special in the L<...> context.
Although the hyperlink parser does its best to determine which \*(L"/\*(R" is
text and which is a delimiter in case of doubt, one ought to escape
these literal characters like this:
.Sp
.Vb 2
\& / E<sol>
\& | E<verbar>
.Ve
.SH "RETURN VALUE"
.IX Header "RETURN VALUE"
\&\fBpodchecker\fR returns the number of \s-1POD\s0 syntax errors found or \-1 if
there were no \s-1POD\s0 commands at all found in the file.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
\&\fI[T.B.D.]\fR
.SH "INTERFACE"
.IX Header "INTERFACE"
While checking, this module collects document properties, e.g. the nodes
for hyperlinks (\f(CW\*(C`=headX\*(C'\fR, \f(CW\*(C`=item\*(C'\fR) and index entries (\f(CW\*(C`X<>\*(C'\fR).
\&\s-1POD\s0 translators can use this feature to syntax-check and get the nodes in
a first pass before actually starting to convert. This is expensive in terms
of execution time, but allows for very robust conversions.
.ie n .IP """Pod::Checker\->new( %options )""" 4
.el .IP "\f(CWPod::Checker\->new( %options )\fR" 4
.IX Item "Pod::Checker->new( %options )"
Return a reference to a new Pod::Checker object that inherits from
Pod::Parser and is used for calling the required methods later. The
following options are recognized:
.Sp
\&\f(CW\*(C`\-warnings => num\*(C'\fR
Print warnings if \f(CW\*(C`num\*(C'\fR is true. The higher the value of \f(CW\*(C`num\*(C'\fR,
the more warnings are printed. Currently there are only levels 1 and 2.
.Sp
\&\f(CW\*(C`\-quiet => num\*(C'\fR
If \f(CW\*(C`num\*(C'\fR is true, do not print any errors/warnings. This is useful
when Pod::Checker is used to munge \s-1POD\s0 code into plain text from within
\&\s-1POD\s0 formatters.
.ie n .IP """$checker\->poderror( @args )""" 4
.el .IP "\f(CW$checker\->poderror( @args )\fR" 4
.IX Item "$checker->poderror( @args )"
.PD 0
.ie n .IP """$checker\->poderror( {%opts}, @args )""" 4
.el .IP "\f(CW$checker\->poderror( {%opts}, @args )\fR" 4
.IX Item "$checker->poderror( {%opts}, @args )"
.PD
Internal method for printing errors and warnings. If no options are
given, simply prints \*(L"@_\*(R". The following options are recognized and used
to form the output:
.Sp
.Vb 1
\& -msg
.Ve
.Sp
A message to print prior to \f(CW@args\fR.
.Sp
.Vb 1
\& -line
.Ve
.Sp
The line number the error occurred in.
.Sp
.Vb 1
\& -file
.Ve
.Sp
The file (name) the error occurred in.
.Sp
.Vb 1
\& -severity
.Ve
.Sp
The error level, should be '\s-1WARNING\s0' or '\s-1ERROR\s0'.
.ie n .IP """$checker\->num_errors()""" 4
.el .IP "\f(CW$checker\->num_errors()\fR" 4
.IX Item "$checker->num_errors()"
Set (if argument specified) and retrieve the number of errors found.
.ie n .IP """$checker\->name()""" 4
.el .IP "\f(CW$checker\->name()\fR" 4
.IX Item "$checker->name()"
Set (if argument specified) and retrieve the canonical name of \s-1POD\s0 as
found in the \f(CW\*(C`=head1 NAME\*(C'\fR section.
.ie n .IP """$checker\->node()""" 4
.el .IP "\f(CW$checker\->node()\fR" 4
.IX Item "$checker->node()"
Add (if argument specified) and retrieve the nodes (as defined by \f(CW\*(C`=headX\*(C'\fR
and \f(CW\*(C`=item\*(C'\fR) of the current \s-1POD\s0. The nodes are returned in the order of
their occurrence. They consist of plain text, each piece of whitespace is
collapsed to a single blank.
.ie n .IP """$checker\->idx()""" 4
.el .IP "\f(CW$checker\->idx()\fR" 4
.IX Item "$checker->idx()"
Add (if argument specified) and retrieve the index entries (as defined by
\&\f(CW\*(C`X<>\*(C'\fR) of the current \s-1POD\s0. They consist of plain text, each piece
of whitespace is collapsed to a single blank.
.ie n .IP """$checker\->hyperlink()""" 4
.el .IP "\f(CW$checker\->hyperlink()\fR" 4
.IX Item "$checker->hyperlink()"
Add (if argument specified) and retrieve the hyperlinks (as defined by
\&\f(CW\*(C`L<>\*(C'\fR) of the current \s-1POD\s0. They consist of a 2\-item array: line
number and \f(CW\*(C`Pod::Hyperlink\*(C'\fR object.
.SH "AUTHOR"
.IX Header "AUTHOR"
Brad Appleton <bradapp@enteract.com> (initial version),
Marek Rouchal <marek@saftsack.fs.uni\-bayreuth.de>
.PP
Based on code for \fB\f(BIPod::Text::pod2text()\fB\fR written by
Tom Christiansen <tchrist@mox.perl.com>
|