perldoc > Pod::Checker

📝 NAME

Pod::Checker — check pod documents for syntax errors

🚀 Quick Reference

Use CaseCommandDescription
Check POD syntaxpodchecker($filepath, $outputpath, %options)Basic syntax check; returns number of errors
Check with warningspodchecker($filepath, $outputpath, -warnings => 1)Enable warnings for style issues
Object-oriented checkmy $checker = Pod::Checker->new(%options); $checker->parse_from_file($filepath, \*STDERR);Using the OO interface for more control
Suppress outputpodchecker($filepath, $outputpath, -quiet => 1)Only return error count, no printed messages
Get hyperlinks$checker->hyperlinks()Retrieve array of external link objects

🖥️ SYNOPSIS

use Pod::Checker;

$syntax_okay = podchecker($filepath, $outputpath, %options);

my $checker = Pod::Checker->new(%options);
$checker->parse_from_file($filepath, \*STDERR);

⚙️ OPTIONS/ARGUMENTS

$filepath is the input POD to read and $outputpath is where to write POD 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 defaults to \*STDIN, and the output-file defaults to \*STDERR.

📋 podchecker()

This function can take a hash of options:

📖 DESCRIPTION

podchecker will perform syntax checking of Perl5 POD format documentation.

Curious/ambitious users are welcome to propose additional features they wish to see in Pod::Checker and podchecker and verify that the checks are consistent with perlpod.

The following checks are currently performed:

🩺 DIAGNOSTICS

⚠️ Errors

⚠️ Warnings

These may not necessarily cause trouble, but indicate mediocre style.

🔗 Hyperlinks

There are some warnings with respect to malformed hyperlinks:

  /     E<sol>
  |     E<verbar>

Note that the line number of the error/warning may refer to the line number of the start of the paragraph in which the error/warning exists, not the line number that the error/warning is on. This bug is present in errors/warnings related to formatting codes. This should be fixed.

🔄 RETURN VALUE

podchecker returns the number of POD syntax errors found or -1 if there were no POD commands at all found in the file.

📝 EXAMPLES

See SYNOPSIS.

📜 SCRIPTS

The podchecker script that comes with this distribution is a lean wrapper around this module. See the online manual with

podchecker -help
podchecker -man

🧩 INTERFACE

While checking, this module collects document properties, e.g. the nodes for hyperlinks (=headX, =item) and index entries (X<>). POD 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.

Since v1.24 the Pod::Checker module uses only the poderror method to print errors and warnings. The summary output (e.g. "Pod syntax OK") has been dropped from the module and has been included in podchecker (the script). This allows users of Pod::Checker to control completely the output behavior. Users of podchecker (the script) get the well-known behavior.

v1.45 inherits from Pod::Simple as opposed to all previous versions inheriting from Pod::Parser. Do not use Pod::Simple's interface when using Pod::Checker unless it is documented somewhere on this page. I repeat, DO NOT USE POD::SIMPLE'S INTERFACE.

The following list documents the overrides to Pod::Simple, primarily to make Pod::Coverage happy:

📋 Pod::Checker->new( %options )

Return a reference to a new Pod::Checker object that inherits from Pod::Simple and is used for calling the required methods later. The following options are recognized:

📋 $checker->poderror( @args ) / $checker->poderror( {%opts}, @args )

Internal method for printing errors and warnings. If no options are given, simply prints @_. The following options are recognized and used to form the output:

📋 $checker->num_errors() / $checker->num_warnings() / $checker->name() / $checker->node() / $checker->idx() / $checker->hyperlinks()

Set (if argument specified) and retrieve the respective property:

line() — Returns the approximate line number in which the link was encountered.

type() — Returns the type of the link; one of: "url" for things like http://www.foo, "man" for man pages, or "pod".

page() — Returns the linked-to page or url.

node() — Returns the anchor or node within the linked-to page, or an empty string ("") if none appears in the link.

👤 AUTHOR

Please report bugs using <http://rt.cpan.org>.

Brad Appleton <bradapp AT enteract.com> (initial version), Marek Rouchal <marekr AT cpan.org>, Marc Green <marcgreen AT cpan.org> (port to Pod::Simple) Ricardo Signes <rjbs AT cpan.org> (more porting to Pod::Simple) Karl Williamson <khw AT cpan.org> (more porting to Pod::Simple)

Based on code for Pod::Text::pod2text() written by Tom Christiansen <tchrist AT mox.com>.

Pod::Checker
📝 NAME 🚀 Quick Reference 🖥️ SYNOPSIS ⚙️ OPTIONS/ARGUMENTS
📋 podchecker()
📖 DESCRIPTION 🩺 DIAGNOSTICS
⚠️ Errors ⚠️ Warnings 🔗 Hyperlinks
🔄 RETURN VALUE 📝 EXAMPLES 📜 SCRIPTS 🧩 INTERFACE
📋 Pod::Checker->new( %options ) 📋 $checker->poderror( @args ) / $checker->poderror( {%opts}, @args ) 📋 $checker->num_errors() / $checker->num_warnings() / $checker->name() / $checker->node() / $checker->idx() / $checker->hyperlinks()
👤 AUTHOR

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-21 02:31 @216.73.216.45
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^