- COPYRIGHT AND LICENSE
TPath::Expression - a compiled TPath expression
my $f = MyForester->new; # make a new forester for my sort of tree my $path = $f->path('//foo[@bar][-1]'); # select the last foo with the bar property my $tree = next_tree(); # get the next tree (hypothetical function) my ($foo) = $path->select($tree); # get the desired node $foo = $path->first($tree); # achieves the same result
An object that will get us the nodes identified by our path expression.
The expression's TPath::Forester.
Variables available during the application of this expression.
Takes a tree and, optionally, an index and options. Returns the nodes selected from this tree by the path if you want a list or the first node selected if you want a scalar.
The options, if any, will be passed through to the forester's
wrap method to define any coercion necessary.
If you are doing many selections on a particular tree, you may save some work by using a common index for all selections.
Returns whether this expression was created by a case insensitive forester.
David F. Houghton <firstname.lastname@example.org>
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.