| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package ExtUtils::Builder::Node; |
|
2
|
|
|
|
|
|
|
$ExtUtils::Builder::Node::VERSION = '0.020'; |
|
3
|
10
|
|
|
10
|
|
616365
|
use strict; |
|
|
10
|
|
|
|
|
22
|
|
|
|
10
|
|
|
|
|
428
|
|
|
4
|
10
|
|
|
10
|
|
100
|
use warnings; |
|
|
10
|
|
|
|
|
22
|
|
|
|
10
|
|
|
|
|
625
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
2628
|
use parent qw/ExtUtils::Builder::Action::Composite/; |
|
|
10
|
|
|
|
|
1758
|
|
|
|
10
|
|
|
|
|
80
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
564
|
use Carp 'croak'; |
|
|
10
|
|
|
|
|
91
|
|
|
|
10
|
|
|
|
|
4694
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
|
11
|
28
|
|
|
28
|
0
|
188
|
my ($class, %args) = @_; |
|
12
|
28
|
50
|
|
|
|
100
|
croak('Attribute target is not defined') if not $args{target}; |
|
13
|
28
|
|
100
|
|
|
50
|
$args{actions} = [ map { $_->flatten } @{ $args{actions} // [] } ]; |
|
|
21
|
|
|
|
|
122
|
|
|
|
28
|
|
|
|
|
120
|
|
|
14
|
28
|
|
100
|
|
|
93
|
$args{dependencies} //= []; |
|
15
|
28
|
100
|
66
|
|
|
145
|
$args{type} //= delete $args{phony} ? 'phony' : 'file'; |
|
16
|
28
|
|
|
|
|
144
|
return $class->SUPER::new(%args); |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub flatten { |
|
20
|
28
|
|
|
28
|
1
|
1296
|
my $self = shift; |
|
21
|
28
|
|
|
|
|
49
|
return @{ $self->{actions} }; |
|
|
28
|
|
|
|
|
131
|
|
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub target { |
|
25
|
50
|
|
|
50
|
1
|
87
|
my $self = shift; |
|
26
|
50
|
|
|
|
|
748
|
return $self->{target}; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub dependencies { |
|
30
|
40
|
|
|
40
|
1
|
69
|
my $self = shift; |
|
31
|
40
|
|
|
|
|
60
|
return @{ $self->{dependencies} }; |
|
|
40
|
|
|
|
|
184
|
|
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub type { |
|
35
|
32
|
|
|
32
|
1
|
54
|
my $self = shift; |
|
36
|
32
|
|
|
|
|
245
|
return $self->{type}; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub phony { |
|
40
|
11
|
|
|
11
|
1
|
20
|
my $self = shift; |
|
41
|
11
|
|
|
|
|
72
|
return $self->{type} eq 'phony'; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub mergeable { |
|
45
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
46
|
0
|
|
0
|
|
|
0
|
return $self->{type} eq 'phony' && !@{ $self->{actions} }; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub newer_than { |
|
50
|
6
|
|
|
6
|
0
|
14
|
my ($self, $mtime) = @_; |
|
51
|
6
|
50
|
|
|
|
15
|
return 1 if $self->{type} eq 'phony'; |
|
52
|
6
|
|
33
|
|
|
77
|
return -d $self->{target} || (-e _ && $mtime <= -M _); |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# ABSTRACT: An ExtUtils::Builder Node |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |