line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# App::hopen::H - H:: namespace for use in hopen files |
2
|
|
|
|
|
|
|
package App::hopen::H; |
3
|
1
|
|
|
1
|
|
104142
|
use Data::Hopen::Base; |
|
1
|
|
|
|
|
47
|
|
|
1
|
|
|
|
|
8
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000010'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1296
|
use parent 'Exporter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
510
|
use vars::i '@EXPORT' => []; |
|
1
|
|
|
|
|
808
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
86
|
use vars::i '@EXPORT_OK' => qw(files); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
10
|
1
|
|
|
|
|
5
|
use vars::i '%EXPORT_TAGS' => ( |
11
|
|
|
|
|
|
|
default => [@EXPORT], |
12
|
|
|
|
|
|
|
all => [@EXPORT, @EXPORT_OK] |
13
|
1
|
|
|
1
|
|
83
|
); |
|
1
|
|
|
|
|
2
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
459
|
use App::hopen::BuildSystemGlobals; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
129
|
|
16
|
1
|
|
|
1
|
|
565
|
use App::hopen::G::FilesCmd; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
50
|
|
17
|
1
|
|
|
1
|
|
455
|
use App::hopen::Util::BasedPath; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
124
|
|
18
|
1
|
|
|
1
|
|
7
|
use Data::Hopen qw(hlog getparameters); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
19
|
1
|
|
|
1
|
|
469
|
use Data::Hopen::G::GraphBuilder; |
|
1
|
|
|
|
|
2626
|
|
|
1
|
|
|
|
|
73
|
|
20
|
1
|
|
|
1
|
|
9
|
use Data::Hopen::Util::Data qw(forward_opts); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
21
|
1
|
|
|
1
|
|
6
|
use Path::Class; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
275
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Docs {{{1 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Data::Hopen::H - H:: namespace for use in hopen files |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
This module is loaded as C<H::*> into hopen files by |
32
|
|
|
|
|
|
|
L<Data::Hopen::HopenFileKit>. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 FUNCTIONS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# }}}1 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 files |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Creates a command-graph node representing a set of input files. |
43
|
|
|
|
|
|
|
Example usage: |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
$Build->H::files('foo.c')->C::compile->C::link('foo')->default_goal; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The node is an L<App::hopen::G::FilesCmd>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
The file path is assumed to be relative to the current project directory. |
50
|
|
|
|
|
|
|
TODO handle subdirectories. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Adds each specified file as a separate node in the asset graph. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub files { |
57
|
|
|
|
|
|
|
my ($builder, %args) = getparameters('self', ['*'], @_); |
58
|
|
|
|
|
|
|
hlog { __PACKAGE__, 'files:', Dumper(\%args) } 3; |
59
|
|
|
|
|
|
|
my $lrFiles = $args{'*'} // []; |
60
|
|
|
|
|
|
|
my @files = map { based_path(path => file($_), base => $ProjDir) } @$lrFiles; |
61
|
|
|
|
|
|
|
hlog { __PACKAGE__, 'file objects:', @files } 3; |
62
|
|
|
|
|
|
|
my $files_op = App::hopen::G::FilesCmd->new( |
63
|
|
|
|
|
|
|
files => [ @files ], |
64
|
|
|
|
|
|
|
forward_opts(\%args, 'name') |
65
|
|
|
|
|
|
|
); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
return $files_op; |
68
|
|
|
|
|
|
|
} #files() |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
make_GraphBuilder 'files'; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |
73
|
|
|
|
|
|
|
__END__ |
74
|
|
|
|
|
|
|
# vi: set fdm=marker: # |