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
|
|
14
|
use Data::Hopen; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
114
|
|
4
|
2
|
|
|
2
|
|
13
|
use strict; use warnings; |
|
2
|
|
|
2
|
|
5
|
|
|
2
|
|
|
|
|
41
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
72
|
|
5
|
2
|
|
|
2
|
|
11
|
use Data::Hopen::Base; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.000013'; # TRIAL |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
2616
|
use parent 'App::hopen::G::Cmd'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
use Class::Tiny { |
11
|
0
|
|
|
|
|
0
|
files => sub { [] }, |
12
|
2
|
|
|
2
|
|
153
|
}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
21
|
|
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
960
|
use App::hopen::Asset; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
355
|
|
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
|
|
|
4
|
|
1374
|
my ($self, %args) = getparameters('self', [qw(visitor ; *)], @_); |
51
|
|
|
|
|
|
|
|
52
|
4
|
|
|
|
|
285
|
my @assets = $self->make(@{$self->files}); |
|
4
|
|
|
|
|
100
|
|
53
|
4
|
|
|
|
|
56
|
$args{visitor}->asset($_) foreach @assets; |
54
|
|
|
|
|
|
|
|
55
|
4
|
|
|
|
|
19
|
return {}; |
56
|
|
|
|
|
|
|
} #run() |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
__END__ |
60
|
|
|
|
|
|
|
# vi: set fdm=marker: # |