1Tree::Simple::Visitor::UVsaerriaCbolnetDreipbtuThtrCeeldeo:nP:eeS(ri3lm)pDloec:u:mVeinstiattoiro:n:VariableDepthClone(3)
2
3
4

NAME

6       Tree::Simple::Visitor::VariableDepthClone - A Visitor for cloning parts
7       of Tree::Simple hierarchy
8

SYNOPSIS

10         use Tree::Simple::Visitor::VariableDepthClone;
11
12         # create an visitor
13         my $visitor = Tree::Simple::Visitor::VariableDepthClone->new();
14
15         $visitor->setCloneDepth(3);
16
17         # pass our visitor to the tree
18         $tree->accept($visitor);
19
20         my $partial_tree = $visitor->getClone();
21

DESCRIPTION

23       This visitor will clone
24

METHODS

26       new There are no arguments to the constructor the object will be in its
27           default state. You can use the "setNodeFilter" method to customize
28           its behavior.
29
30       includeTrunk ($boolean)
31           Based upon the value of $boolean, this will tell the visitor to
32           include the trunk of the tree in the traversal as well. This basi‐
33           cally means it will clone the root node as well.
34
35       setCloneDepth ($number)
36       setNodeFilter ($filter_function)
37           This method accepts a CODE reference as its $filter_function argu‐
38           ment and throws an exception if it is not a code reference. This
39           code reference is used to filter the tree nodes as they are cloned.
40
41       visit ($tree)
42           This is the method that is used by Tree::Simple's "accept" method.
43           It can also be used on its own, it requires the $tree argument to
44           be a Tree::Simple object (or derived from a Tree::Simple object),
45           and will throw and exception otherwise.
46
47       getClone
48           This method returns the cloned partial tree.
49

BUGS

51       None that I am aware of. Of course, if you find a bug, let me know, and
52       I will be sure to fix it.
53

CODE COVERAGE

55       See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more
56       inforamtion.
57

SEE ALSO

59       These Visitor classes are all subclasses of Tree::Simple::Visitor,
60       which can be found in the Tree::Simple module, you should refer to that
61       module for more information.
62

AUTHOR

64       stevan little, <stevan@iinteractive.com>
65
67       Copyright 2005 by Infinity Interactive, Inc.
68
69       <http://www.iinteractive.com>
70
71       This library is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73
74
75
76perl v5.8.8                       2T0r0e5e-:0:7S-i1m3ple::Visitor::VariableDepthClone(3)
Impressum