File Coverage

blib/lib/Build/Hopen/G/Link.pm
Criterion Covered Total %
statement 24 24 100.0
branch 2 2 100.0
condition n/a
subroutine 9 9 100.0
pod 2 2 100.0
total 37 37 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   1415 use Build::Hopen qw(:default UNSPECIFIED);
  3         5  
  3         278  
4 3     3   16 use Build::Hopen::Base;
  3         6  
  3         14  
5              
6             our $VERSION = '0.000006'; # TRIAL
7              
8 3     3   549 use parent 'Build::Hopen::G::Runnable';
  3         6  
  3         14  
9             use Class::Tiny {
10 3         11 greedy => 0
11 3     3   131 };
  3         6  
12              
13 3     3   571 use Build::Hopen::Util::Data qw(clone);
  3         6  
  3         112  
14 3     3   14 use Build::Hopen::Arrrgs;
  3         4  
  3         538  
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 1 15 my ($self, %args) = parameters('self', [qw(scope; phase generator)], @_);
40 1     1   8 hlog { Running => __PACKAGE__ , $self->name };
  1         4  
41 1         15 return $self->passthrough(-scope => $args{scope});
42             } #run()
43              
44              
45             =head2 BUILD
46              
47             Constructor. Interprets L.
48              
49             =cut
50              
51             sub BUILD {
52 2     2 1 335 my ($self, $args) = @_;
53 2 100       11 $self->want(UNSPECIFIED) if $args->{greedy};
54             #hlog { 'Link::BUILD', Dumper($self), Dumper($args) };
55             #hlog { 'Link::BUILD', Dumper($self->scope) };
56             } #BUILD()
57              
58             1;
59             __END__