line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Tree::Visualize::Node::INode; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
28
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
148
|
|
5
|
4
|
|
|
4
|
|
25
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1083
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
46
|
|
|
46
|
1
|
62
|
my ($_class, $tree) = @_; |
11
|
46
|
|
33
|
|
|
153
|
my $class = ref($_class) || $_class; |
12
|
46
|
|
|
|
|
63
|
my $node = {}; |
13
|
46
|
|
|
|
|
107
|
bless($node, $class); |
14
|
46
|
|
|
|
|
88
|
$node->_init($tree); |
15
|
46
|
|
|
|
|
119
|
return $node; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _init { |
19
|
46
|
|
|
46
|
|
55
|
my ($self, $tree) = @_; |
20
|
46
|
50
|
33
|
|
|
587
|
(defined($tree) && ref($tree) && |
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
21
|
|
|
|
|
|
|
(UNIVERSAL::isa($tree, "Tree::Binary") || UNIVERSAL::isa($tree, "Tree::Simple"))) |
22
|
|
|
|
|
|
|
|| throw Tree::Visualize::InsufficientArguments "You must supply a tree to a Node object"; |
23
|
46
|
|
|
|
|
116
|
$self->{tree} = $tree; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub draw { throw Tree::Visualize::MethodNotImplemented } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |