Pod::Abstract::Parser
Internal Parser class of Pod::Abstract.
- Provided by: libpod-abstract-perl (Version: 0.26-1)
- Report a bug
Internal Parser class of Pod::Abstract.
This is a "Pod::Parser" subclass, used by "Pod::Abstract" to convert Pod text into a Node tree.
Use this class via the Pod::Abstract class which has "load" methods provided.
Pod::Abstract::Parser->new( $pod_abstract );
Requires a Pod::Abstract object to load Pod data into. Should only be called internally by Pod::Abstract.
This is a subclass of Pod::Parser and uses that class to handle all basic Pod parsing, but implements the additional rules from perlpodspec that require more context.
In general, a verbatim node is created as any indented text in a POD block. However, there's a special case which is that -
The behaviour here is very much a DWIM - if you're in a non-parsed block this will interpret it correctly even though "Pod::Parser" will tell you it's a verbatim. If you're in a parsed block it will be a ":text".
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 handling as "Pod::Parser" class - we are keeping a command stack which lets us know if we should parse the interior sequences of the text block - the "interior sequences" style commands. In some cases perlpodspec requires them to be ignored, and in some cases they should be parsed.
The %no_parse hash defines commands that generally shouldn't be parsed, but the command parser may add a parameter "parse_me" to the command which will cause their text to be parsed as normal POD text.
Ben Lilburne <bnej80@gmail.com>
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.