Pod::T...erlLib(3pm)
π¦ Pod::Tree::PerlLib π¦
okay bestie, so this whole page is Pod::Tree::PerlLib(3pm) from the Perl docs, and it's literally just here to tell you how to turn module PODs into HTML. it's giving "underrated utility module that runs the whole docs website" energy π
no cap.
β¨ NAME β¨
Pod::Tree::PerlLib β translate module PODs to HTML. that's it, that's the whole job, and she does it beautifully π
πΈ SYNOPSIS πΈ
$perl_map = Pod::Tree::PerlMap->new;
$perl_lib = Pod::Tree::PerlLib->new( $perl_dir, $HTML_dir, $perl_map, %opts );
$perl_lib->scan(@INC);
$perl_lib->index;
$perl_lib->translate;
$top = $perl_lib->get_top_entry;
like, five lines and you've got a whole HTML doc site. main character behavior honestly π
π DESCRIPTION π
Pod::Tree::PerlLib translates module PODs to HTML. lowkey the whole point.
it does a recursive subdirectory search through a list of directories (typically @INC) to find PODs. just, like, hunting them down in every folder. obsessed π
Pod::Tree::PerlLib generates a top-level index of all the PODs that it finds, and writes it to HTML_dir"/lib.html".
Pod::Tree::PerlLib generates and uses an index of the PODs that it finds to construct HTML links. other modules can also use this index. sharing is caring fr fr π«Ά
π§ METHODS π§
$perl_lib = new Pod::Tree::PerlLib $perl_dir, $HTML_dir, $perl_map, %options
Creates and returns a new Pod::Tree::PerlLib object. new object, who dis β¨
$HTML_diris the directory where HTML files will be written. that's where the magic lands.$perl_mapmaps module names to URLs. the lil phonebook of your docs π%optionsare passed through toPod::Tree::HTML. hand em over, she'll deal.
ngl the$perl_dirargument is included for consistency with the otherPod::Tree::Perl*modules, but is currently unused. it's just there to match the fit. aesthetic consistency only π
$perl_lib->scan(@INC)
Does a recursive subdirectory search through @INC to locate module PODs. each module that is identified is entered into $perl_map. collecting them all like pokΓ©mon π
$perl_lib->index
Generates a top-level index of all the modules. the index is written to HTML_dir"/lib.html". your lil table of contents, slay.
$perl_lib->translate
Translates each module POD found by scan to HTML. the HTML pages are written to HTML_dir"/lib/", in a subdirectory hierarchy that maps the module names. so like, nested folders mirroring your namespaces. iconic structure fr π
$perl_lib->get_top_entry
Returns a hash reference of the form
{ URL => $URL,
description => $description }
Pod::Tree::PerlTop uses this to build a top-level index of all the Perl PODs. team effort bestie π€
π LINKING π
Pod::Tree::PerlLib expects the second paragraph of the POD to have the form
Foo::Bar - description
and enters Foo::Bar into $perl_map. so like, paragraph two specifically, don't skip it π
To link to a module POD, write
L<Foo::Bar>
and boom, hyperlink. iykyk π«
π REQUIRES π
5.005;
HTML::Stream;
Pod::Tree;
Pod::Tree::HTML;
Pod::Tree::PerlUtil;
yes you need the whole little squad. no skipping members π
β EXPORTS β
Nothing.
literally nothing. she keeps to herself. no exports, no drama, periodt π
π SEE ALSO π
Pod::Tree::HTML, Pod::Tree::PerlMap
go read those too bestie, they're the supporting cast π
π AUTHOR π
Steven McDougall, swmcd@world.std.com
shoutout to the dev, absolute legend π«Ά
π COPYRIGHT π
Copyright (c) 2000 by Steven McDougall. This module is free software; you can redistribute it and/or modify it under the same terms as Perl.
same terms as Perl, so like, be normal about it and we're good πΈ
and that's the whole vibe check bestie π this page came out of perl v5.36.0, dated 2022-11-19, and the manual name is Pod::T...erlLib(3pm) β go forth and translate some PODs, you've got this π¦β¨
π¦ where this page comes from
- debian bookworm: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-tree-perl 1.31-2 Β· 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