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.0902'; |
3
|
13
|
|
|
13
|
|
56775
|
use strict; |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
301
|
|
4
|
13
|
|
|
13
|
|
50
|
use warnings; |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
286
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
414
|
use parent qw(HTML::Widgets::NavMenu::Object); |
|
13
|
|
|
|
|
276
|
|
|
13
|
|
|
|
|
51
|
|
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
|
|
1936
|
my ( $self, $args ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1276
|
100
|
|
|
|
2918
|
$self->_node( $args->{'node'} ) |
26
|
|
|
|
|
|
|
or die "node not specified!"; |
27
|
|
|
|
|
|
|
|
28
|
1272
|
100
|
|
|
|
2475
|
$self->_subs( $args->{'subs'} ) |
29
|
|
|
|
|
|
|
or die "subs not specified!"; |
30
|
|
|
|
|
|
|
|
31
|
1270
|
|
|
|
|
1868
|
$self->_sub_idx(-1); |
32
|
1270
|
|
|
|
|
1893
|
$self->_visited(0); |
33
|
|
|
|
|
|
|
|
34
|
1270
|
100
|
|
|
|
2482
|
$self->_accum_state( $args->{'accum_state'} ) |
35
|
|
|
|
|
|
|
or die "accum_state not specified!"; |
36
|
|
|
|
|
|
|
|
37
|
1269
|
|
|
|
|
2037
|
return 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _is_visited |
41
|
|
|
|
|
|
|
{ |
42
|
1066
|
|
|
1066
|
|
1346
|
my $self = shift; |
43
|
1066
|
|
|
|
|
1879
|
return $self->_visited(); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _visit |
47
|
|
|
|
|
|
|
{ |
48
|
880
|
|
|
880
|
|
1589
|
my $self = shift; |
49
|
|
|
|
|
|
|
|
50
|
880
|
|
|
|
|
1340
|
$self->_visited(1); |
51
|
|
|
|
|
|
|
|
52
|
880
|
100
|
|
|
|
1395
|
if ( $self->_num_subs_to_go() ) |
53
|
|
|
|
|
|
|
{ |
54
|
481
|
|
|
|
|
1305
|
return $self->_subs()->[ $self->_sub_idx( $self->_sub_idx() + 1 ) ]; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
else |
57
|
|
|
|
|
|
|
{ |
58
|
399
|
|
|
|
|
729
|
return; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _visited_index |
63
|
|
|
|
|
|
|
{ |
64
|
477
|
|
|
477
|
|
634
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
477
|
|
|
|
|
945
|
return $self->_sub_idx(); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub _num_subs_to_go |
70
|
|
|
|
|
|
|
{ |
71
|
1122
|
|
|
1122
|
|
1396
|
my $self = shift; |
72
|
1122
|
|
|
|
|
1626
|
return $self->_num_subs() - $self->_sub_idx() - 1; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _num_subs |
76
|
|
|
|
|
|
|
{ |
77
|
1361
|
|
|
1361
|
|
1662
|
my $self = shift; |
78
|
1361
|
|
|
|
|
1607
|
return scalar( @{ $self->_subs() } ); |
|
1361
|
|
|
|
|
3525
|
|
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub _get_sub |
82
|
|
|
|
|
|
|
{ |
83
|
347
|
|
|
347
|
|
462
|
my $self = shift; |
84
|
347
|
|
|
|
|
435
|
my $sub_num = shift; |
85
|
|
|
|
|
|
|
|
86
|
347
|
|
|
|
|
1037
|
return $self->_subs()->[$sub_num]; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub _li_id |
90
|
|
|
|
|
|
|
{ |
91
|
212
|
|
|
212
|
|
475
|
return shift->_node->li_id(); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__END__ |