# perldoc > Pod::Checker

---
type: CommandReference
command: Pod::Checker
mode: perldoc
section: 
source: perldoc
---

## Quick Reference

- `podchecker($filepath, $outputpath, %options)` — check POD syntax, returns number of errors
- `Pod::Checker->new(%options)->parse_from_file($filepath, \*STDERR)` — OO interface
- `$checker->num_errors()` — get error count
- `$checker->hyperlinks()` — get list of external hyperlinks

## Name

Check pod documents for syntax errors

## Synopsis

perl
use Pod::Checker;

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

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

- `-warnings => num` — Turn warnings on (1) or higher levels for more warnings
- `-quiet => num` — If true, suppress all error/warning output

These options apply to both `podchecker()` and `Pod::Checker->new()`.

## Examples

perl
# Check a file and print errors to STDERR
podchecker('doc.pod', \*STDERR, -warnings => 1);

# OO style: collect errors silently
my $checker = Pod::Checker->new(-quiet => 1);
$checker->parse_from_file('doc.pod');
my $errors = $checker->num_errors();
## Interface

- `Pod::Checker->new(%options)` — Return a new checker object
- `$checker->poderror(@args)` — Print error/warning messages (internal)
- `$checker->num_errors()` — Get/set number of errors found
- `$checker->num_warnings()` — Get/set number of warnings found
- `$checker->name()` — Get/set the canonical POD name (from `=head1 NAME`)
- `$checker->node()` — Get/set list of nodes (`=headX`, `=item`)
- `$checker->idx()` — Get/set list of index entries (`X<>`)
- `$checker->hyperlinks()` — Get array of hyperlink objects (url, man, pod) with methods `line()`, `type()`, `page()`, `node()`

## See Also

- [Pod::Simple](https://metacpan.org/pod/Pod::Simple)
- [perlpod](https://perldoc.perl.org/perlpod)
- [podchecker](https://metacpan.org/pod/podchecker) (script)

## Exit Codes

`podchecker()` returns the number of POD syntax errors found, or `-1` if no POD commands were found at all.