Pod::T...erlDist(3pm)
π Pod::Tree::PerlDist(3pm) β the vibe
okay so bestie, we're in the User Contributed Perl Documentation section, manual page Pod::Tree::PerlDist, section 3pm. and what it does is... translate the Perl distribution's docs into HTML. slay. π
β¨ NAME β¨
Pod::Tree::PerlDist β translate Perl distribution documentation to HTML π¦
πΈ SYNOPSIS πΈ
$perl_map = Pod::Tree::PerlMap->new;
$perl_dist = Pod::Tree::PerlDist->new( $perl_dir, $HTML_dir, $perl_map, %opts );
$perl_dist->scan;
$perl_dist->index;
$perl_dist->translate;
$top = $perl_dist->get_top_entry;
literally that's the whole flow. scan, index, translate, grab the top entry. periodt. β¨
π DESCRIPTION π
Pod::Tree::PerlDist takes the documents chillin' in the Perl distribution and translates them into HTML. we're talking Changes, README, and assorted other files that show up at the top level of the Perl source tree. it's giving "miscellaneous but essential." π
here's the tea on how it handles them:
- files that contain PODs? parsed as PODs, obviously. π
- files that don't contain PODs? converted to HTML as preformatted text. no cap.
Pod::Tree::PerlDist also generates and uses an index of the files it finds, so it can construct HTML links. and the bestie part? other modules can use that index too. sharing is caring. π«Ά
π§ METHODS π§
π $perl_dist = "new" "Pod::Tree::PerlDist" $perl_dir, $HTML_dir, $perl_map, %options
creates and returns a shiny new Pod::Tree::PerlDist object. iconic.
$perl_diris the root of the Perl source tree. π³$HTML_diris the directory where the HTML files are gonna get written. π$perl_mapmaps file names to URLs. πΊοΈ%optionsget passed through toPod::Tree::HTML. β¨
π $perl_dist->"scan"
scans the top level of the Perl source tree looking for documentation files. π
files that don't generally contain user-level documentation β source files, for example β get ignored. and important: the search does not recurse through subdirectories. top level only, bestie, no going deeper. π«
every file that gets located is entered into $perl_map. π
π $perl_dist->"index"
generates a top-level index of all the distribution documents, and writes it to HTML_dir"/dist.html". cute little landing page moment. π
π $perl_dist->"translate"
translates each distribution document that scan found into HTML. the HTML pages get written to HTML_dir. π
π $perl_dist->"get_top_entry"
returns a hash reference shaped like this:
{ URL => $URL,
description => $description }
Pod::Tree::PerlTop uses this to build a top-level index of all the Perl PODs. teamwork makes the dream work. π«Ά
π LINKING π
Pod::Tree::PerlDist indexes files by their name. so if you wanna link to a file named README.win32, you write:
L<README.win32>
that's it. that's the whole thing. iykyk. β¨
π REQUIRES π
5.005;
HTML::Stream;
Pod::Tree;
Pod::Tree::HTML;
Pod::Tree::PerlUtil;
π EXPORTS π
nothing. zero. zilch. the void. π³οΈ
π SEE ALSO π
Pod::Tree::HTML, Pod::Tree::PerlMap
π AUTHOR π
Steven McDougall, swmcd@world.std.com
β 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.
and that's the page, bestie π this was perl v5.36.0, dated 2022-11-19. go forth and translate some docs. mwah. π β¨
π¦ 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