Pod::Tree::Pod(3pm)
πΈ NAME πΈ
Pod::Tree::Pod β bestie, this is the part where we take a Pod::Tree and turn it right back into POD. Yes, a full glow-up in reverse. (Oh and hi, the manual name is Pod::Tree::Pod(3pm), from the User Contributed Perl Documentation crew π«Ά)
β¨ SYNOPSIS β¨
okay so here's the whole vibe, copy-paste ready:
use Pod::Tree::Pod;
$tree = Pod::Tree->new;
$dest = IO::File->new;
$dest = "file.pod";
$pod = Pod::Tree::Pod->new($tree, $dest);
$pod->translate;
like. that's it. that's the whole thing. slay π
π¦ DESCRIPTION π¦
Pod::Tree::Pod converts a Pod::Tree back to a POD. (yes, un-formatting it. the anti-glow-up. we love a round trip β¨)
The destination gets locked in the moment the object is created β like, it's decided, it's final, no take-backs. Then the translate method does the actual translation work. she's the one doing the heavy lifting, no cap.
For convenience (because we're nice like that π), Pod::Tree::Pod can write the POD to a variety of destinations. The new method is the one that figures out what $dest actually means.
π― Destination resolution
Pod::Tree::Pod can write HTML to either of 2 destinations. new resolves $dest by checking these things, in order:
- If
$destis a reference, then it is taken to be anIO::Fileobject that is already open on the file where the POD will be written. - If
$destis not a reference, then it is taken to be the name of the file where the POD will be written.
ngl the original page really does say "HTML" here. we're keeping it exactly as-is because facts stay facts, even when they're a little chaotic π
π METHODS π
$pod = "new" "Pod::Tree::Pod" $tree, $destβ Creates a newPod::Tree::Podobject.
$tree is a Pod::Tree object that represents a POD. $pod writes the POD to $dest. See "Destination resolution" for details. iykyk π
$pod->"translate"β Writes the text of the POD. This method should only be called once. fr fr, one and done, don't be out here calling it twice π
π DIAGNOSTICS π
Pod::Tree::Pod::new: not enough argumentsβ (F)newcalled with fewer than 2 arguments. bestie she needs TWO things minimum, she cannot work with less πPod::Tree::HTML::new: Can't open $dest: $!β (F) The destination file couldn't be opened. the file said no π«
β NOTES β
- The destination doesn't actually have to be an
IO::Fileobject. It may be any object that has aprintmethod. flexible queen energy π
π SEE ALSO π
perl(1), "Pod::Tree", "Pod::Tree::Node" β go read those next, they're the supporting cast π«Ά
π AUTHOR π
Steven McDougall, swmcd@world.std.com
π COPYRIGHT π
Copyright (c) 2000-2003 by Steven McDougall. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie!! π
β¨ this was Pod::Tree::Pod(3pm) from perl v5.36.0, dated 2022-11-19 β literally iconic, no notes, periodt ππ¦
π¦ 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