|
Tree::Binary::Visitor::Base - A Visitor base class for Tree::Binary::Visitor::* objects |
Tree::Binary::Visitor::Base - A Visitor base class for Tree::Binary::Visitor::* objects
package MyTreeBinaryVisitor;
use strict; use warnings;
use Tree::Binary::Visitor::Base;
our @ISA = qw(Tree::Binary::Visitor::Base);
sub visit {
my ($self, $tree) = @_;
# ... implement your visit method
}
1;
This is a base class for Tree::Binary::Visitor objects. If you want to create your own visitor object, just subclass this and create a visit method.
setNodeFilter method to customize its behavior.
setNodeFilter argument.
$filter_function argument. This code reference is used to filter the tree nodes as they are collected. This can be used to customize output, or to gather specific information from a more complex tree node. The filter function should accept a single argument, which is the current Tree::Binary object.
setResults with no argument.
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.
See the CODE COVERAGE section of Tree::Binary for details.
stevan little, <stevan@iinteractive.com>
Copyright 2004, 2005 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|
Tree::Binary::Visitor::Base - A Visitor base class for Tree::Binary::Visitor::* objects |