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.1000'; |
3
|
13
|
|
|
13
|
|
62260
|
use strict; |
|
13
|
|
|
|
|
36
|
|
|
13
|
|
|
|
|
292
|
|
4
|
13
|
|
|
13
|
|
51
|
use warnings; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
300
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
415
|
use parent qw(HTML::Widgets::NavMenu::Object); |
|
13
|
|
|
|
|
309
|
|
|
13
|
|
|
|
|
53
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_acc_ref( [qw(_items)] ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _init |
11
|
|
|
|
|
|
|
{ |
12
|
360
|
|
|
360
|
|
504
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
360
|
|
|
|
|
713
|
$self->_items( [] ); |
15
|
|
|
|
|
|
|
|
16
|
360
|
|
|
|
|
618
|
return 0; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
|
|
|
|
|
|
{ |
22
|
9
|
|
|
9
|
1
|
22
|
my $self = shift; |
23
|
9
|
|
|
|
|
17
|
my $item = shift; |
24
|
|
|
|
|
|
|
|
25
|
9
|
|
|
|
|
11
|
push @{ $self->_items() }, $item; |
|
9
|
|
|
|
|
20
|
|
26
|
|
|
|
|
|
|
|
27
|
9
|
|
|
|
|
19
|
return 0; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub len |
32
|
|
|
|
|
|
|
{ |
33
|
105
|
|
|
105
|
1
|
1593
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
105
|
|
|
|
|
139
|
return scalar( @{ $self->_items() } ); |
|
105
|
|
|
|
|
421
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub top |
40
|
|
|
|
|
|
|
{ |
41
|
5
|
|
|
5
|
1
|
11
|
my $self = shift; |
42
|
5
|
|
|
|
|
24
|
return $self->_items->[-1]; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub item |
47
|
|
|
|
|
|
|
{ |
48
|
4
|
|
|
4
|
1
|
12
|
my $self = shift; |
49
|
4
|
|
|
|
|
7
|
my $index = shift; |
50
|
4
|
|
|
|
|
21
|
return $self->_items->[$index]; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub pop |
55
|
|
|
|
|
|
|
{ |
56
|
4
|
|
|
4
|
1
|
9
|
my $self = shift; |
57
|
4
|
|
|
|
|
5
|
return pop( @{ $self->_items() } ); |
|
4
|
|
|
|
|
13
|
|
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub is_empty |
62
|
|
|
|
|
|
|
{ |
63
|
4
|
|
|
4
|
1
|
9
|
my $self = shift; |
64
|
4
|
|
|
|
|
12
|
return ( $self->len() == 0 ); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub reset |
69
|
|
|
|
|
|
|
{ |
70
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
1
|
|
|
|
|
2
|
$#{ $self->_items() } = -1; |
|
1
|
|
|
|
|
7
|
|
73
|
|
|
|
|
|
|
|
74
|
1
|
|
|
|
|
3
|
return 0; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |