File Coverage

blib/lib/App/hopen/G/AssetOp.pm
Criterion Covered Total %
statement 31 32 96.8
branch n/a
condition 2 2 100.0
subroutine 9 10 90.0
pod n/a
total 42 44 95.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 2     2   140671 use strict; use warnings;
  2     2   14  
  2         55  
  2         9  
  2         4  
  2         54  
5 2     2   9 use Data::Hopen::Base;
  2         3  
  2         12  
6 2     2   3001 use Quote::Code;
  2         775  
  2         10  
7              
8             our $VERSION = '0.000013'; # TRIAL
9              
10 2     2   126 use parent 'App::hopen::G::Cmd';
  2         4  
  2         12  
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         4658 asset => [ sub { eval { $_[0]->DOES('App::hopen::Asset') } },
  15         89  
19 2   100 2   757 sub { qc'{$_[0]//"<undef>"} is not an App::hopen::Asset or subclass' } ];
  2         12541  
  2         24  
  3         987  
  3         40  
20              
21 2         15 use Class::Tiny qw(asset), {
22             how => undef,
23 2     2   1699 };
  2         4  
24              
25 2     2   969 use App::hopen::Asset;
  2         4  
  2         61  
26 2     2   12 use Data::Hopen::Util::Data qw(forward_opts);
  2         4  
  2         195  
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     0     sub _run { ... }
57              
58             1;
59             __END__
60             # vi: set fdm=marker: #