Hopen/G/Link.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 100% 35 / 35 CC 2 SCAR 2.0
CC
2
Cov
100%
BUILD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Hopen/G/Goal.pm ↑ Summary Hopen/G/CollectOp.pm »
1 # Build::Hopen::G::Link - base class for hopen edges
2 package Build::Hopen::G::Link;
3 3 ▶use Build::Hopen qw(:default UNSPECIFIED);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Build::Hopen::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '0.000008'; # TRIAL
7  
8 3 ▶use parent 'Build::Hopen::G::Runnable';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use Class::Tiny {
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 greedy => 0
11 3 };
12  
13 3 ▶use Build::Hopen::Util::Data qw(clone);
Subroutine BEGIN: called CC=1 SCAR=0.0
14 3 ▶use Build::Hopen::Arrrgs;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 =head1 NAME
17  
18 Build::Hopen::G::Link - The base class for all hopen links between ops.
19  
20 =head1 VARIABLES
21  
22 =head2 greedy
23  
24 If set truthy in the C<new()> call, the edge will ask for all inputs.
25  
26 =head1 FUNCTIONS
27  
28 =head2 run
29  
30 Copy the inputs to the outputs.
31  
32 my $hrOutputs = $op->run($scope)
33  
34 The output is C<{}> if no inputs are provided.
35  
36 =cut
37  
38 1 ▶sub _run {
Subroutine _run: called CC=1 SCAR=0.0
39 1 my ($self, %args) = parameters('self', [qw(; phase generator)], @_);
40 1 return $self->passthrough(-nocontext => 1);
41 } #run()
42  
43  
44 =head2 BUILD
45  
46 Constructor. Interprets L</greedy>.
47  
48 =cut
49  
50 2 ▶sub BUILD {
Subroutine BUILD: called CC=2 SCAR=6.9
Pod documented
51 2 my ($self, $args) = @_;
52 2 ▶ $self->want(UNSPECIFIED) if $args->{greedy};
Branch: 1 branch
BranchTrueFalseTotal
if $args->{"greedy"} 1 1 2
53 #hlog { 'Link::BUILD', Dumper($self), Dumper($args) };
54 #hlog { 'Link::BUILD', Dumper($self->scope) };
55 } #BUILD()
56  
57 3 1;
58 __END__
« Hopen/G/Goal.pm ↑ Summary Hopen/G/CollectOp.pm »