line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widgets::NavMenu::Tree::Iterator::Item; |
2
|
|
|
|
|
|
|
$HTML::Widgets::NavMenu::Tree::Iterator::Item::VERSION = '1.1000'; |
3
|
13
|
|
|
13
|
|
61864
|
use strict; |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
300
|
|
4
|
13
|
|
|
13
|
|
54
|
use warnings; |
|
13
|
|
|
|
|
19
|
|
|
13
|
|
|
|
|
298
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
440
|
use parent qw(HTML::Widgets::NavMenu::Object); |
|
13
|
|
|
|
|
381
|
|
|
13
|
|
|
|
|
52
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_acc_ref( |
9
|
|
|
|
|
|
|
[ |
10
|
|
|
|
|
|
|
qw( |
11
|
|
|
|
|
|
|
_node |
12
|
|
|
|
|
|
|
_subs |
13
|
|
|
|
|
|
|
_sub_idx |
14
|
|
|
|
|
|
|
_visited |
15
|
|
|
|
|
|
|
_accum_state |
16
|
|
|
|
|
|
|
) |
17
|
|
|
|
|
|
|
] |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _init |
22
|
|
|
|
|
|
|
{ |
23
|
1276
|
|
|
1276
|
|
1854
|
my ( $self, $args ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1276
|
100
|
|
|
|
3021
|
$self->_node( $args->{'node'} ) |
26
|
|
|
|
|
|
|
or die "node not specified!"; |
27
|
|
|
|
|
|
|
|
28
|
1272
|
100
|
|
|
|
2589
|
$self->_subs( $args->{'subs'} ) |
29
|
|
|
|
|
|
|
or die "subs not specified!"; |
30
|
|
|
|
|
|
|
|
31
|
1270
|
|
|
|
|
1932
|
$self->_sub_idx(-1); |
32
|
1270
|
|
|
|
|
1809
|
$self->_visited(0); |
33
|
|
|
|
|
|
|
|
34
|
1270
|
100
|
|
|
|
2505
|
$self->_accum_state( $args->{'accum_state'} ) |
35
|
|
|
|
|
|
|
or die "accum_state not specified!"; |
36
|
|
|
|
|
|
|
|
37
|
1269
|
|
|
|
|
2127
|
return 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _is_visited |
41
|
|
|
|
|
|
|
{ |
42
|
1066
|
|
|
1066
|
|
1401
|
my $self = shift; |
43
|
1066
|
|
|
|
|
1947
|
return $self->_visited(); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _visit |
47
|
|
|
|
|
|
|
{ |
48
|
880
|
|
|
880
|
|
1218
|
my $self = shift; |
49
|
|
|
|
|
|
|
|
50
|
880
|
|
|
|
|
1303
|
$self->_visited(1); |
51
|
|
|
|
|
|
|
|
52
|
880
|
100
|
|
|
|
1260
|
if ( $self->_num_subs_to_go() ) |
53
|
|
|
|
|
|
|
{ |
54
|
481
|
|
|
|
|
1239
|
return $self->_subs()->[ $self->_sub_idx( $self->_sub_idx() + 1 ) ]; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
else |
57
|
|
|
|
|
|
|
{ |
58
|
399
|
|
|
|
|
714
|
return; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _visited_index |
63
|
|
|
|
|
|
|
{ |
64
|
477
|
|
|
477
|
|
638
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
477
|
|
|
|
|
901
|
return $self->_sub_idx(); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub _num_subs_to_go |
70
|
|
|
|
|
|
|
{ |
71
|
1122
|
|
|
1122
|
|
1361
|
my $self = shift; |
72
|
1122
|
|
|
|
|
1647
|
return $self->_num_subs() - $self->_sub_idx() - 1; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _num_subs |
76
|
|
|
|
|
|
|
{ |
77
|
1361
|
|
|
1361
|
|
1699
|
my $self = shift; |
78
|
1361
|
|
|
|
|
1561
|
return scalar( @{ $self->_subs() } ); |
|
1361
|
|
|
|
|
3432
|
|
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub _get_sub |
82
|
|
|
|
|
|
|
{ |
83
|
347
|
|
|
347
|
|
492
|
my $self = shift; |
84
|
347
|
|
|
|
|
429
|
my $sub_num = shift; |
85
|
|
|
|
|
|
|
|
86
|
347
|
|
|
|
|
1081
|
return $self->_subs()->[$sub_num]; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub _li_id |
90
|
|
|
|
|
|
|
{ |
91
|
212
|
|
|
212
|
|
478
|
return shift->_node->li_id(); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__END__ |