Pandoc::Filter::Usage(3pm)

Pandoc::Filter::Usage3pm

Get filter documentation from pod

Usage

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);

Overview

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.

From libpandoc-elements-perl 0.24-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.