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

filter: Statementstmt 96.5% 28 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 94.7% 36 / 38 CC 2 SCAR 2.6
CC
2
Cov
97%
__ANON__
2.0
_run
2.0
BEGIN
1.0
CRAP 1.3
« blib/lib/App/hopen/Gen/Ninja.pm ↑ Summary blib/lib/App/hopen/Util.pm »
1 # App::hopen::G::FilesCmd - Cmd that outputs a list of files.
2 package App::hopen::G::FilesCmd;
3 2 ▶use Data::Hopen;
Subroutine BEGIN: called CC=1 SCAR=0.0
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  
7 2 our $VERSION = '0.000013'; # TRIAL
8  
9 2 ▶use parent 'App::hopen::G::Cmd';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 use Class::Tiny {
11 0 ▶ files => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
12 2 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 2 ▶use App::hopen::Asset;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 # Docs {{{1
17  
18 =head1 NAME
19  
20 App::hopen::G::FilesCmd - Cmd that holds a list of files.
21  
22 =head1 SYNOPSIS
23  
24 my $node = App::hopen::G::FilesCmd(files=>['foo.c'], name=>'foo node');
25  
26 Used by L<App::hopen::H/files>.
27  
28 =head1 ATTRIBUTES
29  
30 =head2 files
31  
32 The files that this Cmd outputs. Intended to be L<App::hopen::Util::BasedPath>
33 instances.
34  
35 =head1 FUNCTIONS
36  
37 =cut
38  
39 # }}}1
40  
41 =head2 _run
42  
43 Create L<App::hopen::Asset>s for the listed files and add them to the
44 generator's asset graph.
45 See L<App::hopen::Conventions/INTERNALS>.
46  
47 =cut
48  
49 sub _run {
50 4 ▶ my ($self, %args) = getparameters('self', [qw(visitor ; *)], @_);
Subroutine _run: called CC=2 SCAR=6.9
51  
52 4 my @assets = $self->make(@{$self->files});
53 4 $args{visitor}->asset($_) foreach @assets;
54  
55 4 return {};
56 } #run()
57  
58 2 1;
59 __END__
60 # vi: set fdm=marker: #
« blib/lib/App/hopen/Gen/Ninja.pm ↑ Summary blib/lib/App/hopen/Util.pm »