B::XPath 0.01
Sponsored Links
B::XPath 0.01 Ranking & Summary
File size:
0.007 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1092
Date added:
2007-06-26
Publisher:
chromatic
B::XPath 0.01 description
B::XPath class can search Perl optrees with XPath syntax.
SYNOPSIS
Perl represents programs internally as a tree of opcodes. To execute a program, it walks this tree, performing each operation as it encounters it. The B family of modules allows you to examine (and in some cases, manipulate) this optree on programs even as they run.
B::XPath allows you to use XPath syntax to select ops in the optree.
use B::XPath;
my $node = B::XPath->fetch_root( &some_function );
my $root = B::XPath->fetch_main_root();
# find all global scalar accesses
my @globals = $root->match( //gvsv );
# find all global scalar accesses within some_function() named $bob
my @bobs = $node->match( //gvsv[@NAME="bob"] );
Class Methods
There are two methods to use to start your match; both set the root of the tree to search. Theres also a nice helper method youll probably never use unless you find a bug.
fetch_root( $subref )
This method returns the B::XPath::Node object at the root of the optree for the subroutine reference. All matches performed on this node will search this branch of the optree for matching nodes.
fetch_main_root()
This method returns the B::XPath::Node object at the root of the program. Use this to search your entire program (at least, the part of it outside of any given subroutine).
find_op_class( $op )
Given a B::OP or descendent object, returns the name of the appropriate B::XPath::Node subclass to use to wrap that op so that B::XPath can manipulate it appropriately.
SYNOPSIS
Perl represents programs internally as a tree of opcodes. To execute a program, it walks this tree, performing each operation as it encounters it. The B family of modules allows you to examine (and in some cases, manipulate) this optree on programs even as they run.
B::XPath allows you to use XPath syntax to select ops in the optree.
use B::XPath;
my $node = B::XPath->fetch_root( &some_function );
my $root = B::XPath->fetch_main_root();
# find all global scalar accesses
my @globals = $root->match( //gvsv );
# find all global scalar accesses within some_function() named $bob
my @bobs = $node->match( //gvsv[@NAME="bob"] );
Class Methods
There are two methods to use to start your match; both set the root of the tree to search. Theres also a nice helper method youll probably never use unless you find a bug.
fetch_root( $subref )
This method returns the B::XPath::Node object at the root of the optree for the subroutine reference. All matches performed on this node will search this branch of the optree for matching nodes.
fetch_main_root()
This method returns the B::XPath::Node object at the root of the program. Use this to search your entire program (at least, the part of it outside of any given subroutine).
find_op_class( $op )
Given a B::OP or descendent object, returns the name of the appropriate B::XPath::Node subclass to use to wrap that op so that B::XPath can manipulate it appropriately.
B::XPath 0.01 Screenshot
B::XPath 0.01 Keywords
XPath
XPath 0.01
xpath syntax
Can Search
root
search
class
Perl
syntax
optree
B::XPath
BXPath
B::XPath 0.01
Libraries
Programming
Bookmark B::XPath 0.01
B::XPath 0.01 Copyright
WareSeeker periodically updates pricing and software information of B::XPath 0.01 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of B::XPath 0.01 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
PLJava is Perl module that will embed Perl into Java. Free Download
PObject is a base class for perl objects, takes the irritation out of creating properties for objects. Free Download
Class::DispatchToAll Perl module can dispatch a method call to all inherited methods. Free Download
Class::Std is a Perl module to support for creating standard "inside-out" classes. Free Download
Class::Trait is a Perl implementation of Traits in Perl. Free Download
dtRdr::User.pm is a user class as a Perl module. Free Download
Embperl::TOC is a Perl module for Embperl Documenation: Table of Contents. Free Download
Bundle::Perl6 is a Perl bundle to install Perl6-related modules. Free Download
Latest Software
Popular Software
Favourite Software