Pod::Simple::FromTree - parse POD from tree form
use parent "Pod::Simple::FromTree"; $parser->parse_tree($podtree);
This is a subclass of Pod::Simple, intended to be further subclassed. Objects of this class, as with Pod::Simple, can parse a POD document, internally using an event-based protocol, and subclasses are expected to add specific behaviour to do something with the events. This class provides a method to parse from an existing parse tree, of the type that Pod::Simple::SimpleTree generates. (The basic Pod::Simple can only parse from POD source, either in a file or in a Perl string.)
Not only can this class be directly subclassed, but it can also be mixed into an existing subclass of Pod::Simple. For example, a class that inherits from this class and Pod::Man (which is a subclass of Pod::Simple) can accept a POD parse tree and render it as man page nroff source. Class::Mix provides a mechanism to generate such mixed classes on demand.
Processing POD from the parse tree form is useful in almost any non-trivial workflow. Most obviously, it is useful if automatic or structured editing of the POD is desired, which is most easily performed on the parse tree form of the document. It is also an efficiency improvement if the same document is to be rendered in more than one form: the POD source can be parsed once to generate a parse tree (using Pod::Simple::SimpleTree), and then the parse tree rendered multiple times (using subclasses of this class).
Takes a POD parse tree (or part thereof), of the type generated by Pod::Simple::SimpleTree, and generates the internal parser events corresponding to that tree.
Andrew Main (Zefram) <firstname.lastname@example.org>
Copyright (C) 2010 PhotoBox Ltd
Copyright (C) 2011, 2012, 2017 Andrew Main (Zefram) <email@example.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.