NAME
Pod::Definitions -- extract main sections and contained definitions from
Pod
VERSION
version 0.04
SYNOPSIS
my $pod_file = Pod::Definitions->new();
$pod_file->parse_file($file_name);
DESCRIPTION
This class uses Pod::Headings to parse a Pod file and extract the
top-level (head1) headings, and the names of the functions, methods,
events, or such as documented therein.
Heading names, presumed to be written in the English language, are
simplifed for indexing purposes. (See Pod::Definitions::Heuristic for
details.)
METHODS
new
Creates a new object of type Pod::Definitions
parse_file
Parse a podfile, or Perl source file. Returns the Pod::Headings object,
which, as a subclass of Pod::Simple, may give various useful information
about the parsed document (e.g., the line_count() or pod_para_count()
methods, or the source_dead() method which will be true if the
Pod::Simple parser successfully read, and came to the end of, a
document).
file
Local path to file as passed to parse_file
manpage
Full name of manpage (e.g., 'Mojo::Path').
module
Module leaf name (e.g., 'Path')
sections
Hash (with the key being the toplevel section, e.g., "FUNCTIONS") of
arrays of section information hashes. If no sections (other than the
standard NAME and SEE ALSO) were given in the Pod file, "sections" will
be undef.
Section information hashes contain the following:
raw The text of the heading as it occurs in the source file
cooked
The 'cleaned' text of the heading, from Pod::Definitions::Heuristic
sequence
The sequential number of the heading, from Pod::Headings
link
The "manpage" value of the file
link_fragment
The heading text, converted to an href compatible with metacpan and
other displays.
SEE ALSO
Pod::Simple, Pod::Headings, Pod::Definitions::Heuristic
SUPPORT
This module is managed in an open GitLab repository,
<https://gitlab.com/wlindley/Pod-Definitions>. Feel free to fork and
contribute, or to clone and send patches.
AUTHOR
This module was written and is maintained by William Lindley
<wlindley@cpan.org>.