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