File Coverage

blib/lib/App/hopen/G/AssetOp.pm
Criterion Covered Total %
statement 25 26 96.1
branch n/a
condition 2 2 100.0
subroutine 7 8 87.5
pod n/a
total 34 36 94.4


line stmt bran cond sub pod time code
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 1     1   106126 use Data::Hopen::Base;
  1         14  
  1         7  
5 1     1   1715 use Quote::Code;
  1         784  
  1         4  
6              
7             our $VERSION = '0.000010';
8              
9 1     1   64 use parent 'App::hopen::G::Cmd';
  1         3  
  1         5  
10             # we use Class::Tiny below
11              
12             use Class::Tiny::ConstrainedAccessor
13 3         3182 asset => [ sub { eval { $_[0]->DOES('App::hopen::Asset') } },
  3         40  
14 1   100 1   713 sub { qc'{$_[0]//"<undef>"} is not an App::hopen::Asset or subclass' } ];
  1         1542  
  1         11  
  3         1021  
  3         56  
15              
16 1         4 use Class::Tiny qw(asset), {
17             how => undef,
18 1     1   133 };
  1         2  
19              
20 1     1   819 use App::hopen::Asset;
  1         3  
  1         34  
21 1     1   7 use Data::Hopen::Util::Data qw(forward_opts);
  1         1  
  1         90  
22              
23             # Docs
24              
25             =head1 NAME
26              
27             App::hopen::G::AssetOp - parent class for operations used by a generator to build an asset
28              
29             =head1 SYNOPSIS
30              
31             This is an abstract class. Each generator implements its own subclass of
32             AssetOp for its own use.
33              
34             =head1 ATTRIBUTES
35              
36             =head2 asset
37              
38             An L<App::hopen::Asset> instance.
39              
40             =head2 how
41              
42             If defined, a string suitable as input to C<sprinti> in L<String::Print>.
43              
44             TODO or a different formatter?
45              
46             TODO? require that format specifications call a specified modifier that
47             will quote file names for shell-specific command-line use.
48              
49             =cut
50              
51 0     0     sub _run { ... }
52              
53             1;
54             __END__
55             # vi: set fdm=marker: #