Pod::Definitions -- extract main sections and contained definitions from Pod
version 0.04
my $pod_file = Pod::Definitions->new(); $pod_file->parse_file($file_name);
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.)
Creates a new object of type Pod::Definitions
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).
Local path to file as passed to parse_file
Full name of manpage (e.g., 'Mojo::Path').
Module leaf name (e.g., 'Path')
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.
sections
Section information hashes contain the following:
The text of the heading as it occurs in the source file
The 'cleaned' text of the heading, from Pod::Definitions::Heuristic
The sequential number of the heading, from Pod::Headings
The manpage value of the file
manpage
The heading text, converted to an href compatible with metacpan and other displays.
Pod::Simple, Pod::Headings, Pod::Definitions::Heuristic
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.
This module was written and is maintained by William Lindley <wlindley@cpan.org>.
To install Pod::Definitions, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Definitions
CPAN shell
perl -MCPAN -e shell install Pod::Definitions
For more information on module installation, please visit the detailed CPAN module installation guide.