Pod::T...erlMap(3pm)
π NAME π
Pod::Tree::PerlMap β bestie, it maps names to URLs. That's the whole job. It's giving phonebook but for links. β¨
πΈ SYNOPSIS πΈ
$perl_map = new Pod::Tree::PerlMap;
$perl_map->add_page ($name, $file);
$perl_map->add_func ($func, $file);
$perl_map->force_func(0);
$perl_map->force_func(1);
$perl_map->set_depth ($depth);
($base, $page, $section) = $perl_map->map($base, $page, $section);
π¦ DESCRIPTION π¦
Pod::Tree::PerlMap takes L<> markups and turns them into URLs. It's the translator of links, the glow-up artist of raw markup. π
The Pod::Tree::Perl* translators are the ones who make entries in the map. Then Pod::Tree::HTML uses that map to translate links before it emits them β so the link is already slaying by the time it hits your output. π₯
π METHODS π
π $perl_map->"add_page"($name, $file)
Maps $name to $file. $name is the name of a POD, exactly as it's used in L<> markups. $file is the path to the HTML file that is the target of the link. So like, name in, destination out. Iconic. β¨
π $perl_map->"add_func"($func, $file)
Maps $func to $file. $func is the name of a function described in perlfunc.pod. $file is the name of the HTML file where that function is described. π«Ά
π $perl_map->"force_func"($state)
This one controls how links of the form L<func> get interpreted. Big main character energy for such a tiny method.
- If $state is true, calls to
"map"will interpretL<func>asL<perlfunc/func>. - If $state is false, calls to
"map"will interpretL<func>normally.
That's it. That's the vibe check. β
π§ $perl_map->"set_depth"($depth)
Tells $perl_map how deep the referring page sits in the HTML directory tree. Why does it need to know, you ask? Because it has to construct relative links, and you can't do that math without knowing where you're standing. It's literally just spatial awareness. πΈ
β ($base, $page, $section) = $perl_map->"map"($base, $page, $section)
Remaps a link. The glow-up moment. π«
- $base is the base URL for the HTML page, if any.
- $page is the page given in an
L<>markup. - $section is the section given in the
L<>markup, if any.
"map" returns a new $base, $page, and $section that you can use to construct a link to the HTML page. New values, same names, no notes. π₯
π REQUIRES π
Nothing. Not a single thing. Low maintenance queen. π
π EXPORTS π
Nothing. It keeps everything to itself, and honestly? Respect. π
π 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.
okay so that's the whole page, bestie β no cap, every single flag, arg, default and reference is right there π«Ά
This was Pod::T...erlMap(3pm) from the User Contributed Perl Documentation, built on perl v5.36.0 and dated 2022-11-19. 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