line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
69
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Gentoo::Dependency::AST::State; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
78
|
$Gentoo::Dependency::AST::State::AUTHORITY = 'cpan:KENTNL'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
|
$Gentoo::Dependency::AST::State::VERSION = '0.001001'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: Temporal Tree State controller |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Class::Tiny { |
17
|
|
|
|
|
|
|
stack => sub { |
18
|
1
|
|
|
|
|
504
|
require Gentoo::Dependency::AST::Node::TopLevel; |
19
|
1
|
|
|
|
|
11
|
return [ Gentoo::Dependency::AST::Node::TopLevel->new() ]; |
20
|
|
|
|
|
|
|
}, |
21
|
1
|
|
|
1
|
|
943
|
}; |
|
1
|
|
|
|
|
3363
|
|
|
1
|
|
|
|
|
11
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _croak { |
25
|
0
|
|
|
0
|
|
0
|
require Carp; |
26
|
0
|
|
|
|
|
0
|
goto &Carp::croak; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
## no critic (ProhibitBuiltinHomonyms) |
31
|
|
|
|
|
|
|
sub state { |
32
|
35
|
|
|
35
|
1
|
44
|
my ($self) = @_; |
33
|
35
|
50
|
|
|
|
705
|
if ( not defined $self->stack->[-1] ) { |
34
|
0
|
|
|
|
|
0
|
return _croak(q[Empty stack]); |
35
|
|
|
|
|
|
|
} |
36
|
35
|
|
|
|
|
989
|
return $self->stack->[-1]; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _pushstack { |
41
|
6
|
|
|
6
|
|
9
|
my ( $self, $element ) = @_; |
42
|
6
|
|
|
|
|
6
|
push @{ $self->stack }, $element; |
|
6
|
|
|
|
|
140
|
|
43
|
6
|
|
|
|
|
44
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub _popstack { |
48
|
6
|
|
|
6
|
|
10
|
my ($self) = @_; |
49
|
6
|
|
|
|
|
6
|
return pop @{ $self->stack }; |
|
6
|
|
|
|
|
135
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub add_dep { |
54
|
21
|
|
|
21
|
1
|
35
|
my ( $self, $depstring ) = @_; |
55
|
21
|
|
|
|
|
691
|
require Gentoo::Dependency::AST::Node::Dependency; |
56
|
21
|
|
|
|
|
42
|
$self->state->add_dep( |
57
|
|
|
|
|
|
|
$self, |
58
|
|
|
|
|
|
|
Gentoo::Dependency::AST::Node::Dependency->new( |
59
|
|
|
|
|
|
|
depstring => $depstring |
60
|
|
|
|
|
|
|
) |
61
|
|
|
|
|
|
|
); |
62
|
21
|
|
|
|
|
44
|
return; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub enter_notuse_group { |
67
|
1
|
|
|
1
|
1
|
2
|
my ( $self, $useflag ) = @_; |
68
|
1
|
|
|
|
|
517
|
require Gentoo::Dependency::AST::Node::Group::NotUse; |
69
|
1
|
|
|
|
|
4
|
$self->state->enter_notuse_group( |
70
|
|
|
|
|
|
|
$self, |
71
|
|
|
|
|
|
|
Gentoo::Dependency::AST::Node::Group::NotUse->new( |
72
|
|
|
|
|
|
|
useflag => $useflag |
73
|
|
|
|
|
|
|
) |
74
|
|
|
|
|
|
|
); |
75
|
1
|
|
|
|
|
2
|
return; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub enter_use_group { |
80
|
5
|
|
|
5
|
1
|
12
|
my ( $self, $useflag ) = @_; |
81
|
5
|
|
|
|
|
24
|
require Gentoo::Dependency::AST::Node::Group::Use; |
82
|
5
|
|
|
|
|
12
|
$self->state->enter_use_group( $self, Gentoo::Dependency::AST::Node::Group::Use->new( useflag => $useflag ) ); |
83
|
5
|
|
|
|
|
14
|
return; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub enter_or_group { |
88
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
89
|
0
|
|
|
|
|
0
|
require Gentoo::Dependency::AST::Node::Group::Or; |
90
|
0
|
|
|
|
|
0
|
$self->state->enter_or_group( $self, Gentoo::Dependency::AST::Node::Group::Or->new() ); |
91
|
0
|
|
|
|
|
0
|
return; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub enter_and_group { |
96
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
97
|
0
|
|
|
|
|
0
|
require Gentoo::Dependency::AST::Node::Group::And; |
98
|
0
|
|
|
|
|
0
|
$self->state->enter_and_group( $self, Gentoo::Dependency::AST::Node::Group::And->new() ); |
99
|
0
|
|
|
|
|
0
|
return; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub exit_group { |
104
|
6
|
|
|
6
|
1
|
11
|
my ($self) = @_; |
105
|
6
|
|
|
|
|
14
|
$self->state->exit_group($self); |
106
|
6
|
|
|
|
|
13
|
return; |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
__END__ |