File Coverage

blib/lib/Build/Hopen/G/PassthroughOp.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 2 2 100.0
total 35 35 100.0


line stmt bran cond sub pod time code
1             # Build::Hopen::G::PassthroughOp - A no-op operation
2             package Build::Hopen::G::PassthroughOp;
3 4     4   439 use Build::Hopen qw(:default UNSPECIFIED);
  4         7  
  4         427  
4 4     4   22 use Build::Hopen::Base;
  4         7  
  4         25  
5              
6             our $VERSION = '0.000006'; # TRIAL
7              
8 4     4   809 use parent 'Build::Hopen::G::Op';
  4         8  
  4         19  
9             #use Class::Tiny;
10              
11 4     4   208 use Build::Hopen::Util::Data qw(clone);
  4         6  
  4         152  
12 4     4   18 use Build::Hopen::Arrrgs;
  4         8  
  4         133  
13 4     4   18 use Storable ();
  4         8  
  4         566  
14              
15             # Docs {{{1
16              
17             =head1 NAME
18              
19             Build::Hopen::G::PassthroughOp - a no-op
20              
21             =head1 SYNOPSIS
22              
23             An C is a concrete L that passes its inputs
24             to its outputs unchanged. C instances are currently used by
25             L to represent goals.
26              
27             =cut
28              
29             # }}}1
30              
31             =head1 FUNCTIONS
32              
33             =head2 run
34              
35             Do nothing! Usage:
36              
37             my $hrOutputs = $op->run(-scope=>$scope)
38              
39             The output is C<{}> if no inputs are provided.
40              
41             =cut
42              
43             sub run {
44 6     6 1 701 my ($self, %args) = parameters('self', [qw(scope; phase generator)], @_);
45 5     3   35 hlog { Running => __PACKAGE__ , $self->name };
  3         10  
46 5         47 return $self->passthrough(-scope => $args{scope});
47             } #run()
48              
49             =head2 BUILD
50              
51             Constructor
52              
53             =cut
54              
55             sub BUILD {
56 8     8 1 720 my $self = shift;
57 8         27 $self->want(UNSPECIFIED); # we'll take anything
58             }
59              
60             1;
61             __END__