• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/CPANInternal-140/Tree-Simple-VisitorFactory/lib/Tree/Simple/Visitor/

Lines Matching defs:Tree

2 package Tree::Simple::Visitor::ToNestedArray;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
58 Tree::Simple::Visitor::ToNestedArray - A Visitor for creating nested array trees from Tree::Simple objects.
62 use Tree::Simple::Visitor::ToNestedArray;
64 my $visitor = Tree::Simple::Visitor::ToNestedArray->new();
66 # given this Tree::Simple tree
67 my $tree = Tree::Simple->new("Root")
69 Tree::Simple->new("Child1")
71 Tree::Simple->new("GrandChild1"),
72 Tree::Simple->new("GrandChild2")
74 Tree::Simple->new("Child2"),
110 Given a tree constructed from a Tree::Simple heirarchy, this Visitor will create the equivalent tree of nested arrays.
126 This method accepts a CODE reference as its C<$filter_function> argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are placed into the array tree. The C<$filter_function> is passed a Tree::Simple object, and is expected to return the value desired for inclusion into the array tree.
130 This is the method that is used by Tree::Simple's C<accept> method. It can also be used on its own, it requires the C<$tree> argument to be a Tree::Simple object (or derived from a Tree::Simple object), and will throw and exception otherwise.
144 See the B<CODE COVERAGE> section in L<Tree::Simple::VisitorFactory> for more inforamtion.
148 These Visitor classes are all subclasses of B<Tree::Simple::Visitor>, which can be found in the B<Tree::Simple> module, you should refer to that module for more information.