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
33           basically 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
38           argument and throws an exception if it is not a code reference.
39           This code reference is used to filter the tree nodes as they are
40           cloned.
41
42       visit ($tree)
43           This is the method that is used by Tree::Simple's "accept" method.
44           It can also be used on its own, it requires the $tree argument to
45           be a Tree::Simple object (or derived from a Tree::Simple object),
46           and will throw and exception otherwise.
47
48       getClone
49           This method returns the cloned partial tree.
50

BUGS

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

CODE COVERAGE

56       See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more
57       information.
58

SEE ALSO

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

AUTHOR

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