Pod::A...:Parser(3pm)
π Pod::A...:Parser(3pm) π
okay so bestie, first things first β this page lives in the User Contributed Perl Documentation section of the manual, and the full name of the thing is Pod::Abstract::Parser. Manifesting that you read the whole thing, mkay? β¨
πΈ NAME πΈ
Pod::Abstract::Parser β the internal parser class of Pod::Abstract. yeah. it's the backstage crew, not the main character (that's Pod::Abstract itself, iykyk).
π¦ DESCRIPTION π¦
So this is a Pod::Parser subclass, right? And Pod::Abstract uses it to turn your Pod text into a lovely little Node tree. π³β¨
Do NOT summon this class directly, bestie. You get to it through the Pod::Abstract class, which ships with load methods all ready for you. that's the whole point. use those. π«Ά
π METHODS π
π
new
Pod::Abstract::Parser->new( $pod_abstract );
It needs a Pod::Abstract object to load the Pod data into β literally required, no object, no parser. And fr fr, this is an internal call: only Pod::Abstract itself should be invoking it. π
Fun fact: this thing is a subclass of Pod::Parser and lets that class handle all the basic Pod parsing, but then it layers on the extra rules from perlpodspec that need more context than the base parser has. she does a little extra. πββοΈ
π verbatim
Okay so general rule: any indented text inside a POD block becomes a verbatim node. cool cool. BUT. there's a special case, and it's giving plot twist:
- If we're inside a
"begin/end"block, that block is by default not parsed, so that text should be text, not verbatim. - But if we're inside a parsed begin/end block (
"parse_me"), then it should still be a verbatim node.
The way this behaves is very much a DWIM moment β if you're in a non-parsed block it'll interpret it correctly even though "Pod::Parser" will tell you it's a verbatim. And if you're in a parsed block, it'll be a ":text". no cap. π₯
This would be verbatim.
=begin example
But if this command was at the start of the line, this would be non-parsed
and would instead be a text node.
=end
π textblock
Textblock handling works like the "Pod::Parser" class does β we're keeping a command stack around so we know whether we should parse the interior sequences of the text block. yep, the "interior sequences" style commands. π In some cases perlpodspec says they must be ignored, and in some cases they should be parsed. so we track it. iconic behaviour honestly.
The %no_parse hash defines the commands that generally shouldn't be parsed β but the command parser may add a parameter called "parse_me" to the command, which then makes their text get parsed as normal POD text. slay. π
β¨ AUTHOR β¨
Ben Lilburne <bnej80@gmail.com> β king behavior, we love him. π
β COPYRIGHT AND LICENSE β
Copyright (C) 2009-2025 Ben Lilburne
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
aaand that's the whole page bestie, you ate that. π
πΈ no notes. this was generated by perl v5.40.1 on 2025-11-16 β so like, go forth and parse responsibly. mwah. π«Άππ¦
π¦ where this page comes from
- ubuntu resolute: libpod-abstract-perl 0.26-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libpod-abstract-perl 0.26-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms