Pod::I...Builder(3pm)
β¨ Pod::Index::Builder β¨
okay bestie, welcome to the Pod::Index::Builder page β yes it's from the User Contributed Perl Documentation and yes it's giving 3pm manual energy, but we're gonna make it cute π
π¦ NAME π¦
Pod::Index::Builder β literally builds a pod index, that's the whole job π
πΈ SYNOPSIS πΈ
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;
no cap, that's it. that's the whole flow. parse files, print index, slay β¨
π DESCRIPTION π
so. this is a subclass of Pod::Parser, which means it reads POD and outputs... nothing. truly the silent main character π. but here's the tea: while it's reading, it saves the position of every single X<> entry it sees π
and then you can grab that index either as a hashref, or print it out in a format that Pod::Index::Search can actually understand. iykyk π«Ά
π METHODS π
π new
the constructor, inherited from Pod::Parser. the only optional argument it actually cares about is pi_base π
if you give it one, it gets used as a base when converting pathnames into package names. for example, if pi_path = lib, then the filename lib/Pod/Index.pm turns into Pod::Index β instead of the extremely undesirable lib::Pod::Index π
not the lib:: prefix bestie. we don't do that here. periodt.
π§ pod_index
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::Entryobjects π
π
print_index
$parser->print_index($fh);
$parser->print_index($filename);
$parser->print_index();
prints the index to the given output filename or filehandle β or STDOUT by default if you're feeling lazy, which, valid π«Ά
the format is tab-delimited, with these columns:
- keyword
- podname
- line number
- context (title of section containing this entry)
and the index is sorted by keyword in a case-insensitive way. obsessed with the consistency honestly β
β VERSION β
0.14
π SEE ALSO π
Pod::IndexPod::Index::EntryPod::Index::SearchPod::Parserperlpod
go read them, they're all iconic in their own way π
π AUTHOR π
Ivan Tubert-Brohman <itub@cpan.org> π
π COPYRIGHT π
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.
and that's the whole page bestie!! π¦β¨ this was perl v5.30.0, dated 2020-05-17, and it's the Pod::I...Builder(3pm) page π
mwah, go build an index, you got this π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-index-perl 0.14-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms