Pod::T...erlPod(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::PerlPod πŸ’–

okay so bestie, meet Pod::Tree::PerlPod β€” she lives in the User Contributed Perl Documentation corner of the perl 3pm pages and her whole job is turning Perl PODs into HTML. no cap. she's from the Pod::Tree family and she is, frankly, the main character of your documentation build. πŸŽ€


✨ NAME ✨

Pod::Tree::PerlPod β€” translate Perl PODs to HTML πŸ¦‹


✨ SYNOPSIS ✨

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

  $perl_pod->scan;
  $perl_pod->index;
  $perl_pod->translate;

  $top = $perl_pod->get_top_entry;

like… that's the whole vibe. four calls and you're done, periodt. πŸ’…


✨ DESCRIPTION ✨

Pod::Tree::PerlPod translates Perl PODs to HTML. the way she does it is a recursive subdirectory search through $perl_dir to find every POD that exists down in there. she's thorough. she does not miss. πŸ‘‘

Pod::Tree::PerlPod also generates a top-level index of all the PODs that it finds, and writes it out to HTML_dir"/pod.html".

and bestie, she doesn't just dump HTML β€” she generates and uses an index of the PODs that it finds, so she can construct HTML links properly. other modules can also use this index, so like, share the wealth. 🫢


✨ METHODS ✨

πŸ’œ $perl_pod = "new" "Pod::Tree::PerlPod" $perl_dir, $HTML_dir, $perl_map, %options

Creates and returns a new Pod::Tree::PerlPod object. a whole new girl, freshly instantiated. ✨

  • $perl_dir β€” the root of the Perl source tree. this is where she starts digging. 🌳
  • $HTML_dir β€” the directory where the HTML files will be written. her little output nest. πŸͺΊ
  • $perl_map β€” maps POD names to URLs. this is the plug that makes linking work.
  • %options β€” these get passed straight through to Pod::Tree::HTML. not her business, she forwards them. πŸ’Œ

🌸 $perl_pod->"scan";

Does a recursive subdirectory search through $perl_dir to locate PODs. and every single POD that is located gets entered into $perl_map. she's cataloguing. she's making a list. she's checking it twice. πŸ“‹

🌈 $perl_pod->"index"

Generates a top-level index of all the PODs. that index gets written to HTML_dir"/pod.html".

⭐ $perl_pod->"translate"

Translates each POD found by "scan" to HTML. the HTML pages are written to HTML_dir, in a subdirectory hierarchy that mirrors the the Perl source distribution.

ok yes, "the the" is in the original, I'm not fixing it, I'm just reporting it, we love her anyway. πŸ™ˆ

πŸ‘‘ $perl_pod->"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. teamwork makes the dream work. 🫢


πŸ”— LINKING πŸ”—

Pod::Tree::PerlPod indexes PODs by the base name of the POD file. so if you wanna link to perlsub.pod, you write:

  L<perlsub>

that's it. that's the whole trick. iykyk. πŸ’…


🧚 REQUIRES 🧚

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

she's got a whole friend group and she needs every one of them. no solo acts here. πŸ’–


πŸŽ€ EXPORTS πŸŽ€

Nothing.

like literally nothing. she gives you nothing and she gives it beautifully. πŸ’€βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

Pod::Tree::HTML, Pod::Tree::PerlMap

go say hi to her friends, they're iconic too. 🫢


πŸ’– 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...erlPod(3pm) from the User Contributed Perl Documentation, running under perl v5.36.0 and last touched 2022-11-19. go build some docs. slay. πŸ‘‘πŸ’…πŸŽ€

πŸ“¦ where this page comes from