debian man page for cql::visitor

Query: cql::visitor

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

CQL::Visitor(3pm)					User Contributed Perl Documentation					 CQL::Visitor(3pm)

NAME
CQL::Visitor - visit nodes in a CQL parse tree
SYNOPSIS
package MyVisitor; use base qw( CQL::Visitor ); sub term { my ($self,$node) = @_; # do something to the node } # later on my $parser = CQL::Parser->new(); my $root = $parser->parse($cql); my $visitor = MyVisitor->new(); $vistor->visit($root);
DESCRIPTION
CQL::Visitor provides a simple interface for visiting nodes in your parse tree. It could be useful if you want to do something like change a query like this: dc.title=foo and dc.creator=bar into title=foo and creator=bar Or some similar procedure. You simply create a new subclass of CQL::Visitor and override the appropriate method, such as term(). Every term that is encountered during the traversal will be handed off to your term() method. Note: at the moment only term() is supported because that's what was needed, but if you need other ones feel free to add them, or ask for them.
METHODS
new() visit() Call this to traverse your parse tree, starting at the root. term() Your subclass should override this, and do something meaningful with the CQL::TermNode object. perl v5.12.4 2009-12-02 CQL::Visitor(3pm)
Related Man Pages
cql::parser(3pm) - debian
catalyst::controller::sru(3pm) - debian
tree::simple::visitor::loadclasshierarchy(3pm) - debian
tree::simple::visitor::postordertraversal(3pm) - debian
tree::simple::visitor::tonestedarray(3pm) - debian
Similar Topics in the Unix Linux Community
Adding the individual columns of a matrix.
How can I do this in VI editor?
Is UNIX an open source OS ?
Detecting unused variables...
Find columns in a file based on header and print to new file