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.0901'; |
3
|
13
|
|
|
13
|
|
56445
|
use strict; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
309
|
|
4
|
13
|
|
|
13
|
|
54
|
use warnings; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
295
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
429
|
use parent qw(HTML::Widgets::NavMenu::Object); |
|
13
|
|
|
|
|
279
|
|
|
13
|
|
|
|
|
56
|
|
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
|
1238
|
|
|
1238
|
|
1759
|
my ( $self, $args ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1238
|
100
|
|
|
|
2882
|
$self->_node( $args->{'node'} ) |
26
|
|
|
|
|
|
|
or die "node not specified!"; |
27
|
|
|
|
|
|
|
|
28
|
1234
|
100
|
|
|
|
2548
|
$self->_subs( $args->{'subs'} ) |
29
|
|
|
|
|
|
|
or die "subs not specified!"; |
30
|
|
|
|
|
|
|
|
31
|
1232
|
|
|
|
|
1938
|
$self->_sub_idx(-1); |
32
|
1232
|
|
|
|
|
1747
|
$self->_visited(0); |
33
|
|
|
|
|
|
|
|
34
|
1232
|
100
|
|
|
|
2272
|
$self->_accum_state( $args->{'accum_state'} ) |
35
|
|
|
|
|
|
|
or die "accum_state not specified!"; |
36
|
|
|
|
|
|
|
|
37
|
1231
|
|
|
|
|
2163
|
return 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _is_visited |
41
|
|
|
|
|
|
|
{ |
42
|
1066
|
|
|
1066
|
|
1371
|
my $self = shift; |
43
|
1066
|
|
|
|
|
1856
|
return $self->_visited(); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _visit |
47
|
|
|
|
|
|
|
{ |
48
|
880
|
|
|
880
|
|
1257
|
my $self = shift; |
49
|
|
|
|
|
|
|
|
50
|
880
|
|
|
|
|
1304
|
$self->_visited(1); |
51
|
|
|
|
|
|
|
|
52
|
880
|
100
|
|
|
|
1303
|
if ( $self->_num_subs_to_go() ) |
53
|
|
|
|
|
|
|
{ |
54
|
481
|
|
|
|
|
1226
|
return $self->_subs()->[ $self->_sub_idx( $self->_sub_idx() + 1 ) ]; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
else |
57
|
|
|
|
|
|
|
{ |
58
|
399
|
|
|
|
|
708
|
return; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _visited_index |
63
|
|
|
|
|
|
|
{ |
64
|
477
|
|
|
477
|
|
643
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
477
|
|
|
|
|
868
|
return $self->_sub_idx(); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub _num_subs_to_go |
70
|
|
|
|
|
|
|
{ |
71
|
1122
|
|
|
1122
|
|
1387
|
my $self = shift; |
72
|
1122
|
|
|
|
|
1698
|
return $self->_num_subs() - $self->_sub_idx() - 1; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _num_subs |
76
|
|
|
|
|
|
|
{ |
77
|
1361
|
|
|
1361
|
|
1709
|
my $self = shift; |
78
|
1361
|
|
|
|
|
1554
|
return scalar( @{ $self->_subs() } ); |
|
1361
|
|
|
|
|
3373
|
|
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub _get_sub |
82
|
|
|
|
|
|
|
{ |
83
|
328
|
|
|
328
|
|
445
|
my $self = shift; |
84
|
328
|
|
|
|
|
426
|
my $sub_num = shift; |
85
|
|
|
|
|
|
|
|
86
|
328
|
|
|
|
|
963
|
return $self->_subs()->[$sub_num]; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub _li_id |
90
|
|
|
|
|
|
|
{ |
91
|
212
|
|
|
212
|
|
455
|
return shift->_node->li_id(); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__END__ |