| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MDOM::Rule::Simple; |
|
2
|
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
72
|
use strict; |
|
|
15
|
|
|
|
|
24
|
|
|
|
15
|
|
|
|
|
537
|
|
|
4
|
15
|
|
|
15
|
|
65
|
use warnings; |
|
|
15
|
|
|
|
|
21
|
|
|
|
15
|
|
|
|
|
388
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#use Smart::Comments; |
|
7
|
15
|
|
|
15
|
|
68
|
use base 'MDOM::Rule'; |
|
|
15
|
|
|
|
|
25
|
|
|
|
15
|
|
|
|
|
63
|
|
|
8
|
15
|
|
|
15
|
|
5951
|
use MDOM::Util qw( trim_tokens ); |
|
|
15
|
|
|
|
|
36
|
|
|
|
15
|
|
|
|
|
6708
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub targets { |
|
11
|
6
|
|
|
6
|
1
|
47
|
my ($self) = @_; |
|
12
|
6
|
100
|
|
|
|
21
|
$self->_parse if !$self->{colon}; |
|
13
|
6
|
|
|
|
|
12
|
my $tokens = $self->{targets}; |
|
14
|
6
|
100
|
|
|
|
27
|
wantarray ? @$tokens : $tokens; |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub normal_prereqs { |
|
18
|
6
|
|
|
6
|
1
|
29
|
my ($self) = @_; |
|
19
|
6
|
50
|
|
|
|
19
|
$self->_parse if !$self->{colon}; |
|
20
|
6
|
|
|
|
|
10
|
my $tokens = $self->{normal_prereqs}; |
|
21
|
6
|
100
|
|
|
|
34
|
wantarray ? @$tokens : $tokens; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub order_prereqs { |
|
25
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
|
26
|
0
|
0
|
|
|
|
0
|
$self->_parse if !$self->{colon}; |
|
27
|
0
|
|
|
|
|
0
|
my $tokens = $self->{order_prereqs}; |
|
28
|
0
|
0
|
|
|
|
0
|
wantarray ? @$tokens : $tokens; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
sub colon { |
|
31
|
3
|
|
|
3
|
1
|
6
|
my ($self) = @_; |
|
32
|
3
|
50
|
|
|
|
14
|
$self->_parse if !$self->{colon}; |
|
33
|
3
|
|
|
|
|
21
|
$self->{colon}; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub command { |
|
37
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
|
38
|
0
|
0
|
|
|
|
0
|
$self->_parse if !$self->{colon}; |
|
39
|
0
|
|
|
|
|
0
|
$self->{command}; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _parse { |
|
43
|
3
|
|
|
3
|
|
4
|
my ($self) = @_; |
|
44
|
3
|
|
|
|
|
17
|
my @elems = $self->elements; |
|
45
|
3
|
|
|
|
|
6
|
my (@targets, $colon, @normal_prereqs, @order_prereqs, $command); |
|
46
|
3
|
|
|
|
|
5
|
my $prereqs = \@normal_prereqs; |
|
47
|
|
|
|
|
|
|
## @elems |
|
48
|
3
|
|
|
|
|
8
|
for my $elem (@elems) { |
|
49
|
34
|
100
|
66
|
|
|
82
|
if (!$colon) { |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
50
|
12
|
100
|
|
|
|
36
|
if ($elem->class eq 'MDOM::Token::Separator') { |
|
51
|
3
|
|
|
|
|
9
|
$colon = $elem->content; |
|
52
|
|
|
|
|
|
|
} else { |
|
53
|
9
|
|
|
|
|
13
|
push @targets, $elem; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
} elsif ($elem->class eq 'MDOM::Token::Comment') { |
|
56
|
1
|
|
|
|
|
3
|
last; |
|
57
|
|
|
|
|
|
|
} elsif ($elem->class eq 'MDOM::Command') { |
|
58
|
0
|
|
|
|
|
0
|
$command = $elem; |
|
59
|
0
|
|
|
|
|
0
|
last; |
|
60
|
|
|
|
|
|
|
} elsif ($elem->class eq 'MDOM::Token::Bare' and |
|
61
|
|
|
|
|
|
|
$elem->content eq '|') { |
|
62
|
0
|
|
|
|
|
0
|
$prereqs = \@order_prereqs; |
|
63
|
|
|
|
|
|
|
} else { |
|
64
|
21
|
|
|
|
|
28
|
push @$prereqs, $elem; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
} |
|
67
|
3
|
|
|
|
|
15
|
trim_tokens(\@targets); |
|
68
|
3
|
|
|
|
|
9
|
trim_tokens(\@normal_prereqs); |
|
69
|
3
|
|
|
|
|
13
|
trim_tokens(\@order_prereqs); |
|
70
|
3
|
|
|
|
|
10
|
$self->{targets} = \@targets; |
|
71
|
3
|
|
|
|
|
7
|
$self->{colon} = $colon; |
|
72
|
3
|
|
|
|
|
9
|
$self->{normal_prereqs} = \@normal_prereqs; |
|
73
|
3
|
|
|
|
|
6
|
$self->{order_prereqs} = \@order_prereqs; |
|
74
|
3
|
|
|
|
|
8
|
$self->{command} = $command; |
|
75
|
|
|
|
|
|
|
### $self |
|
76
|
|
|
|
|
|
|
} |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |