line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Build::Hopen::G::Goal - A named build goal |
2
|
|
|
|
|
|
|
package Build::Hopen::G::Goal; |
3
|
3
|
|
|
3
|
|
1280
|
use Build::Hopen; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
167
|
|
4
|
3
|
|
|
3
|
|
17
|
use Build::Hopen::Base; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
18
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.000007'; # TRIAL |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
653
|
use parent 'Build::Hopen::G::Op'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
18
|
|
9
|
|
|
|
|
|
|
#use Class::Tiny qw(_passthrough); |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
167
|
use Build::Hopen::Arrrgs; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
133
|
|
12
|
3
|
|
|
3
|
|
15
|
use Build::Hopen::Util::Data qw(forward_opts); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
627
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Docs {{{1 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Build::Hopen::G::Goal - a named goal in a hopen build |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
A C is a named build target, e.g., C or C. The name C |
23
|
|
|
|
|
|
|
is reserved for the root goal. Goals usually appear at the end of the build |
24
|
|
|
|
|
|
|
graph, but this is not required --- Goal nodes can appear anywhere in the |
25
|
|
|
|
|
|
|
graph. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 FUNCTIONS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 run |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Wraps a L's run function. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# }}}1 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _run { |
38
|
1
|
|
|
1
|
|
6
|
my ($self, %args) = parameters('self', [qw(; phase generator)], @_); |
39
|
1
|
|
|
0
|
|
19
|
hlog { Goal => $self->name }; |
|
0
|
|
|
|
|
0
|
|
40
|
1
|
|
|
|
|
8
|
return $self->passthrough(-nocontext=>1, -levels => 'local', |
41
|
|
|
|
|
|
|
forward_opts(\%args, {'-'=>1}, qw[phase generator])); |
42
|
|
|
|
|
|
|
} #_run() |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 BUILD |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Enforce the requirement for a user-specified name. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub BUILD { |
51
|
4
|
|
|
4
|
1
|
656
|
my ($self, $args) = @_; |
52
|
4
|
50
|
|
|
|
20
|
croak 'Goals must have names' unless $args->{name}; |
53
|
|
|
|
|
|
|
} #BUILD() |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |