TPath::Context - the context in which a node is evaluated during a search
version 1.006
Basically a data structure holding all the different bits of information that may be useful to selectors, predicates, or attributes during the evaluation of a node. This class simplifies method signatures -- instead of passing a list of parameters one passes a single context.
A TPath::Context is a blessed array rather than a hash, and it is a non-Moose class, for a little added efficiency. Note, that for still greater efficiency it is sometimes treated as an array rather than an object, so it must be regarded as a final class not to be tampered with or extended.
TPath::Context
Returns the context of the node selected immediately before the context node.
Returns the first context in the selection history represented by this context.
The context node.
The TPath::Index.
The previous nodes selected in the course of selecting the context node. These ancestor nodes are in reverse order, so the node's immediate predecessor is at index 0.
The expression the context is being used by. This attribute is not guaranteed to be set and the method, unlike the other accessors, is a setter as well as a getter.
The contextual attribute is available for use by TPath::Attributes, which set the attribute when they are applied to a context.
The stringification of a context is the stringification of its node.
David F. Houghton <dfhoughton@gmail.com>
This software is copyright (c) 2013 by David F. Houghton.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install TPath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TPath
CPAN shell
perl -MCPAN -e shell install TPath
For more information on module installation, please visit the detailed CPAN module installation guide.