Pod::T...erlBin(3pm)

πŸ“¦
version 1.31 Β· 2 versions
  • 1.31 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.31 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Pod::Tree::PerlBin β€” bestie edition πŸ’–

okay so this is a page from the User Contributed Perl Documentation, and it's literally about turning program PODs into HTML. no cap. let's go πŸ¦‹


✨ NAME ✨

Pod::Tree::PerlBin β€” it translates program PODs to HTML, periodt. πŸ’…


🌸 SYNOPSIS 🌸

$perl_map = Pod::Tree::PerlMap->new;
$perl_bin = Pod::Tree::PerlBin->new($perl_dir, $HTML_dir, $perl_map, %opts);

$perl_bin->scan(@path);
$perl_bin->index;
$perl_bin->translate;

$top = $perl_bin->get_top_entry;

like... that's the whole vibe check right there πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

Pod::Tree::PerlBin translates program PODs to HTML. iconic behavior honestly.

It goes hunting for programs in a list of directories (typically a PATH, iykyk), and then it hunts for PODs inside those programs. Only text (-T) files get considered β€” if it's not a text file, it's not invited to the party πŸ™ˆ

Pod::Tree::PerlBin generates a top-level index of all the program PODs and writes it to HTML_dir"/bin.html". slay.

Pod::Tree::PerlBin also generates and uses an index of the PODs it finds, so it can construct HTML links. and bestie, other modules can use this index too 🫢 sharing is caring.


🧚 METHODS 🧚

  • $perl_bin = "new" "Pod::Tree::PerlBin" $perl_dir, $HTML_dir, $perl_map, %options β€” creates and returns a brand new sparkly Pod::Tree::PerlBin object ✨
    • $HTML_dir is the directory where the HTML files get written. that's the home of the HTML. the HTML residence.
    • $perl_map maps program names to URLs.
    • %options get passed straight through to Pod::Tree::HTML.
    • and the $perl_dir argument? it's included for consistency with the other Pod::Tree::Perl* modules, but it's currently unused. it's just there for the vibe 😭
  • $perl_bin->"scan"(@path) β€” scans every single directory in @path looking for program PODs. only text (-T) files are considered. and ngl, the search does not recurse through subdirectories β€” it stays in its lane πŸ’…

Every POD that gets located is entered into $perl_map.

  • $perl_bin->"index" β€” generates a top-level index of all the program PODs and writes it to HTML_dir"/bin.html". ✨
  • $perl_bin->"translate" β€” translates each program POD found by scan into HTML. the HTML pages get written to HTML_dir. obsessed.
  • $perl_bin->"get_top_entry" β€” returns a hash reference that looks 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::PerlBin expects the second paragraph of the POD to have this exact form:

name - description

and it enters name into $perl_map. so if you wanna link to a program POD from another POD, you write:

L<name>

that's it. that's the link. main character energy πŸ’…


⭐ REQUIRES ⭐

5.005
File::Find
HTML::Stream
Pod::Tree
Pod::Tree::HTML
Pod::Tree::PerlUtil

all of these. no skips. πŸ“‹


🌈 EXPORTS 🌈

Nothing. nope. zero. zilch. the export list is empty, and honestly? that's a mood. πŸ’€


πŸ‘€ SEE ALSO πŸ‘€

  • Pod::Tree::HTML
  • Pod::Tree::PerlMap

go read those too, bestie πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Steven McDougall, swmcd@world.std.com


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 whole page, bestie πŸ’– this was Pod::T...erlBin(3pm) from perl v5.36.0, dated 2022-11-19. stan a classic. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from