PPIx::XPath - an XPath implementation for the PDOM
use PPIx::XPath; my $pxp = PPIx::XPath->new("some_code.pl"); my @subs = $pxp->match("//Statement::Sub"); my $vars = $pxp->match("//Token::Symbol");
This module simply provides an XPath implementation for the PDOM using Sam Tregar's nifty Class::XPath.
This expects a single argument which is either a filename or something which inherits from PPI::Node.
Given a XPath query string return a list of the nodes which matched.
Returns an equivalent XPath query string of the current object.
An actual test suite.
No known bugs yet, but if you find any, please report them at:
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PPIx::XPath
PPI
Class::XPath
Dan Brook cpan@broquaint.com
cpan@broquaint.com
To install PPIx::XPath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PPIx::XPath
CPAN shell
perl -MCPAN -e shell install PPIx::XPath
For more information on module installation, please visit the detailed CPAN module installation guide.