line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Forest::Tree::Indexer; |
2
|
4
|
|
|
4
|
|
39887
|
use Moose::Role; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
54
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
5
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'tree' => ( |
8
|
|
|
|
|
|
|
is => 'rw', |
9
|
|
|
|
|
|
|
isa => 'Forest::Tree::Pure', |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'index' => ( |
13
|
|
|
|
|
|
|
traits => ['Hash'], |
14
|
|
|
|
|
|
|
is => 'rw', |
15
|
|
|
|
|
|
|
isa => 'HashRef[Forest::Tree::Pure]', |
16
|
|
|
|
|
|
|
lazy => 1, |
17
|
|
|
|
|
|
|
default => sub { {} }, |
18
|
|
|
|
|
|
|
handles => { |
19
|
|
|
|
|
|
|
get_tree_at => 'get', |
20
|
|
|
|
|
|
|
has_tree_at => 'exists', |
21
|
|
|
|
|
|
|
clear_index => 'clear', |
22
|
|
|
|
|
|
|
get_index_keys => 'keys', |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
requires 'build_index'; |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
3
|
1
|
131
|
sub get_root { (shift)->tree } |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
4
|
|
32068
|
no Moose::Role; 1; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
28
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Forest::Tree::Indexer - An abstract role for tree indexers |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This is an abstract role for tree writers. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over 4 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item I<tree> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item I<index> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=over 4 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item B<get_tree_at ($key)> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item B<clear_index> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item B<get_index_keys> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 REQUIRED METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item B<build_index> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B<get_root> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=back |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 BUGS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
All complex software has bugs lurking in it, and this module is no |
83
|
|
|
|
|
|
|
exception. If you find a bug please either email me, or add the bug |
84
|
|
|
|
|
|
|
to cpan-RT. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 AUTHOR |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Stevan Little E<lt>stevan.little@iinteractive.comE<gt> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Copyright 2008-2014 Infinity Interactive, Inc. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L<http://www.iinteractive.com> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
97
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |