File Coverage

blib/lib/App/hopen/G/FilesCmd.pm
Criterion Covered Total %
statement 23 24 95.8
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 30 31 96.7


line stmt bran cond sub pod time code
1             # App::hopen::G::FilesCmd - Cmd that outputs a list of files.
2             package App::hopen::G::FilesCmd;
3 2     2   13 use Data::Hopen;
  2         4  
  2         111  
4 2     2   12 use strict;
  2         4  
  2         39  
5 2     2   9 use Data::Hopen::Base;
  2         5  
  2         10  
6              
7             our $VERSION = '0.000011';
8              
9 2     2   2610 use parent 'App::hopen::G::Cmd';
  2         4  
  2         13  
10             use Class::Tiny {
11 0         0 files => sub { [] },
12 2     2   153 };
  2         5  
  2         70  
13              
14 2     2   925 use App::hopen::Asset;
  2         6  
  2         274  
15              
16             # Docs {{{1
17              
18             =head1 NAME
19              
20             Data::Hopen::G::FilesCmd - Cmd that holds a list of files.
21              
22             =head1 SYNOPSIS
23              
24             my $node = Data::Hopen::G::FilesCmd(files=>['foo.c'], name=>'foo node');
25              
26             Used by L<Data::Hopen::H/files>.
27              
28             =head1 FUNCTIONS
29              
30             =cut
31              
32             # }}}1
33              
34             =head2 _run
35              
36             Create L<App::hopen::Asset>s for the listed files and add them to the
37             generator's asset graph.
38             See L<Data::Hopen::Conventions/INTERNALS>.
39              
40             =cut
41              
42             sub _run {
43 3     3   1056 my ($self, %args) = getparameters('self', [qw(phase visitor ; *)], @_);
44              
45 3         248 my @assets = $self->make(@{$self->files});
  3         67  
46 3         39 $args{visitor}->asset($_) foreach @assets;
47              
48 3         26 return {};
49             } #run()
50              
51             1;
52             __END__
53             # vi: set fdm=marker: #