- COPYRIGHT AND LICENSE
TPath::Context - the context in which a node is evaluated during a search
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.
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.
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 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 <email@example.com>
COPYRIGHT AND LICENSE
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.