blib/lib/App/hopen/G/AssetOp.pm

filter: Statementstmt 97.0% 33 / 34 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 91.6% 11 / 12 Podpod n/a totaltotal 95.9% 47 / 49 CC 2 SCAR 2.1
CC
2
Cov
97%
__ANON__
2.0
_run
2.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/hopen/Util.pm ↑ Summary blib/lib/App/hopen/T/Gnu/C/CompileCmd.pm »
1 # App::hopen::G::AssetOp - parent class for operations used by a
2 # generator to build an asset
3 package App::hopen::G::AssetOp;
4 2 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Data::Hopen::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Quote::Code;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '0.000013'; # TRIAL
9  
10 2 ▶use parent 'App::hopen::G::Cmd';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 # TODO why is this not directly a child of Data::Hopen::G::Op?
12 # It uses input_assets, but could that be refactored out to a parent
13 # of which this and AhG::Cmd were siblings?
14  
15 # we use Class::Tiny below
16  
17 use Class::Tiny::ConstrainedAccessor
18 15 ▶ asset => [ sub { eval { $_[0]->DOES('App::hopen::Asset') } },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 2 ▶ sub { qc'{$_[0]//"<undef>"} is not an App::hopen::Asset or subclass' } ];
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=2 SCAR=6.9
Condition100%2/2
$_[0] // "<undef>"
l!l
21
MC/DC100%1/1
$_[0] // "<undef>"
$_[0]
Truth table100%2/2
A
A= $_[0]
Aresult
11
00
20  
21 2 use Class::Tiny qw(asset), {
22 how => undef,
23 2 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 2 ▶use App::hopen::Asset;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 2 ▶use Data::Hopen::Util::Data qw(forward_opts);
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 # Docs
29  
30 =head1 NAME
31  
32 App::hopen::G::AssetOp - parent class for operations used by a generator to build an asset
33  
34 =head1 SYNOPSIS
35  
36 This is an abstract class. Each generator implements its own subclass of
37 AssetOp for its own use.
38  
39 =head1 ATTRIBUTES
40  
41 =head2 asset
42  
43 An L<App::hopen::Asset> instance.
44  
45 =head2 how
46  
47 If defined, a string suitable as input to C<sprinti> in L<String::Print>.
48  
49 TODO or a different formatter?
50  
51 TODO? require that format specifications call a specified modifier that
52 will quote file names for shell-specific command-line use.
53  
54 =cut
55  
56 0 ▶sub _run { ... }
Subroutine _run: not called CC=1 SCAR=6.9
57  
58 2 1;
59 __END__
60 # vi: set fdm=marker: #
« blib/lib/App/hopen/Util.pm ↑ Summary blib/lib/App/hopen/T/Gnu/C/CompileCmd.pm »