---
name: "Pandoc::Filter::Usage"
section: "3pm"
platform: "linux"
package: "libpandoc-elements-perl"
version: "0.24-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Pandoc::Filter::Usage"
---

# Pandoc::Filter::Usage(3pm)

get filter documentation from Pod

## 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
