Build a pod index
use Pod::Index::Builder; my $p = Pod::Index::Builder->new( pi_base => $base_path, ); for my $file (@ARGV) { $p->parse_from_file($file); } $p->print_index;
This is a subclass of Pod::Parser that reads \s-1POD\s0 and outputs nothing. However, it saves the position of every X<> entry it sees. The index can be retrieved as a hashref, or printed in a format that is understandable by Pod::Index::Search.
The constructor, inherited from Pod::Parser. The only optional argument that cares about is \*(C`pi_base\*(C'. If given, it is used as a base when converting pathnames to package names. For example, if \*(C`pi_path\*(C' = \*(L"lib\*(R", the filename lib/Pod/Index.pm will turn into \*(C`Pod::Index\*(C', instead of the undesirable \*(C`lib::Pod::Index\*(C'.
Retrieves the index as a hashref. The hash keys are the keywords contained in the X<> tags, normalized to lowercase; the values are array references of Pod::Index::Entry objects.
$parser->print_index($fh); $parser->print_index($filename); $parser->print_index(); Prints the index to the given output filename or filehandle (or \s-1STDOUT\s0 by default). The format is tab-delimited, with the following columns: 1) keyword 2) podname 3) line number 4) context (title of section containing this entry) The index is sorted by keyword in a case-insensitive way.
0.14
Pod::Index, Pod::Index::Entry, Pod::Index::Search, Pod::Parser, perlpod
Ivan Tubert-Brohman <[email protected]>
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.