line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widgets::NavMenu::Tree::Iterator::Stack; |
2
|
|
|
|
|
|
|
$HTML::Widgets::NavMenu::Tree::Iterator::Stack::VERSION = '1.0902'; |
3
|
13
|
|
|
13
|
|
56588
|
use strict; |
|
13
|
|
|
|
|
29
|
|
|
13
|
|
|
|
|
297
|
|
4
|
13
|
|
|
13
|
|
53
|
use warnings; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
481
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
437
|
use parent qw(HTML::Widgets::NavMenu::Object); |
|
13
|
|
|
|
|
263
|
|
|
13
|
|
|
|
|
54
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_acc_ref( [qw(_items)] ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _init |
11
|
|
|
|
|
|
|
{ |
12
|
360
|
|
|
360
|
|
564
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
360
|
|
|
|
|
688
|
$self->_items( [] ); |
15
|
|
|
|
|
|
|
|
16
|
360
|
|
|
|
|
572
|
return 0; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
|
|
|
|
|
|
{ |
22
|
9
|
|
|
9
|
1
|
16
|
my $self = shift; |
23
|
9
|
|
|
|
|
14
|
my $item = shift; |
24
|
|
|
|
|
|
|
|
25
|
9
|
|
|
|
|
13
|
push @{ $self->_items() }, $item; |
|
9
|
|
|
|
|
18
|
|
26
|
|
|
|
|
|
|
|
27
|
9
|
|
|
|
|
13
|
return 0; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub len |
32
|
|
|
|
|
|
|
{ |
33
|
105
|
|
|
105
|
1
|
1271
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
105
|
|
|
|
|
136
|
return scalar( @{ $self->_items() } ); |
|
105
|
|
|
|
|
409
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub top |
40
|
|
|
|
|
|
|
{ |
41
|
5
|
|
|
5
|
1
|
9
|
my $self = shift; |
42
|
5
|
|
|
|
|
20
|
return $self->_items->[-1]; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub item |
47
|
|
|
|
|
|
|
{ |
48
|
4
|
|
|
4
|
1
|
8
|
my $self = shift; |
49
|
4
|
|
|
|
|
6
|
my $index = shift; |
50
|
4
|
|
|
|
|
17
|
return $self->_items->[$index]; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub pop |
55
|
|
|
|
|
|
|
{ |
56
|
4
|
|
|
4
|
1
|
6
|
my $self = shift; |
57
|
4
|
|
|
|
|
5
|
return pop( @{ $self->_items() } ); |
|
4
|
|
|
|
|
11
|
|
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub is_empty |
62
|
|
|
|
|
|
|
{ |
63
|
4
|
|
|
4
|
1
|
8
|
my $self = shift; |
64
|
4
|
|
|
|
|
9
|
return ( $self->len() == 0 ); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub reset |
69
|
|
|
|
|
|
|
{ |
70
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
1
|
|
|
|
|
2
|
$#{ $self->_items() } = -1; |
|
1
|
|
|
|
|
4
|
|
73
|
|
|
|
|
|
|
|
74
|
1
|
|
|
|
|
2
|
return 0; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |