Config-AST
view release on metacpan or search on metacpan
lib/Config/AST/Follow.pm view on Meta::CPAN
Config::AST::Follow - direct addressing engine
=head1 DESCRIPTION
This class implements direct node addressing in B<Config::AST>.
Objects of this class are created as
$obj = Config::AST::Follow->new($node, $lexicon)
where B<$node> is the start node, and B<$lexicon> is the lexicon
corresponding to that node. A B<Config::AST::Follow> object transparently
delegates its methods to the underlying I<$node>, provided that such
method is defined for I<$node>. If it is not, it reproduces itself
with the new B<$node>, obtained as a result of the call to B<$node-E<gt>subtree>
with the method name as its argument. If the result of the B<subtree> call
is a leaf node, it is returned verbatim. The lexicon hash is consulted to
check if the requested node name is allowed or not. If it is not, B<croak>
is called. As a result, the following call:
$obj->A->B->C
( run in 0.621 second using v1.01-cache-2.11-cpan-0a6323c29d9 )