File Coverage

blib/lib/Build/Hopen/G/Link.pm
Criterion Covered Total %
statement 22 22 100.0
branch 2 2 100.0
condition n/a
subroutine 8 8 100.0
pod 1 1 100.0
total 33 33 100.0


line stmt bran cond sub pod time code
1             # Build::Hopen::G::Link - base class for hopen edges
2             package Build::Hopen::G::Link;
3 3     3   1768 use Build::Hopen qw(:default UNSPECIFIED);
  3         6  
  3         350  
4 3     3   20 use Build::Hopen::Base;
  3         12  
  3         18  
5              
6             our $VERSION = '0.000008'; # TRIAL
7              
8 3     3   686 use parent 'Build::Hopen::G::Runnable';
  3         8  
  3         14  
9             use Class::Tiny {
10 3         15 greedy => 0
11 3     3   170 };
  3         8  
12              
13 3     3   656 use Build::Hopen::Util::Data qw(clone);
  3         6  
  3         140  
14 3     3   18 use Build::Hopen::Arrrgs;
  3         7  
  3         539  
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 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             sub _run {
39 1     1   12 my ($self, %args) = parameters('self', [qw(; phase generator)], @_);
40 1         9 return $self->passthrough(-nocontext => 1);
41             } #run()
42              
43              
44             =head2 BUILD
45              
46             Constructor. Interprets L.
47              
48             =cut
49              
50             sub BUILD {
51 2     2 1 456 my ($self, $args) = @_;
52 2 100       13 $self->want(UNSPECIFIED) if $args->{greedy};
53             #hlog { 'Link::BUILD', Dumper($self), Dumper($args) };
54             #hlog { 'Link::BUILD', Dumper($self->scope) };
55             } #BUILD()
56              
57             1;
58             __END__