perl-pod 0.12.2

POD documentation extractor for Perl .pm files
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented0 out of 4 items with examples
  • Size
  • Source code size: 20.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • EffortlessMetrics/perl-lsp
    8 2 151
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EffortlessSteven

perl-pod

POD extractor for Perl .pm files.

Use this crate when you need structured documentation text for hover cards, module docs, or other editor surfaces without pulling in the full parser or LSP stack.

Where it fits

perl-pod sits at the documentation edge of the workspace. It reads POD blocks from source text or files and returns a small data model that downstream crates can render or attach to diagnostics.

Key entry points

  • PodDoc - extracted NAME, SYNOPSIS, DESCRIPTION, and method docs
  • extract_pod(source) - parse POD from a Perl source string
  • extract_pod_from_file(path) - read a file and extract its POD

Example

use perl_pod::{PodDoc, extract_pod};

let doc: PodDoc = extract_pod(
    r#"
=head1 NAME
My::Module - example module

=head1 SYNOPSIS
use My::Module;
=cut
"#,
);

assert_eq!(doc.name.as_deref(), Some("My::Module - example module"));

Typical use

Use perl-pod when a caller already has Perl source and only needs the documentation sections. If you need syntax analysis or symbol resolution first, parse with perl-parser and then layer POD extraction on top.