NAME

Pandoc::Filter::Usage - get filter documentation from Pod

SYNOPSIS

Called automatically in "pandoc_filter" in Pandoc::Filter. If a filter does not directly use this function, use like this:

my %opt;
Getopt::Long::GetOptions(\%opt, 'help|?', 'to|write:s');
Pandoc::Filter::Usage::frompod(\%opt);

DESCRIPTION

This module provides the function frompod as replacement for pod2usage to get and print documentation of a filter.

FUNCTIONS

frompod [ %options | { %options } ]

Prints filter documentation from its Pod and exits if option help is true. If no options are passed, options are read from @ARGV with GetOpt::Long to check whether command line option --help, -h, -?, or --about was specified.

If option to or write is given, Pod::Simple::Pandoc is used to parse the Pod and Pandoc is used to create output in the selected format. Documentation is printed with Pod::Text otherwise.

SEE ALSO

Pod::Usage