line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Setup::Path; |
2
|
41
|
|
|
41
|
|
1259
|
use strict; |
|
41
|
|
|
|
|
79
|
|
|
41
|
|
|
|
|
1264
|
|
3
|
41
|
|
|
41
|
|
192
|
use warnings; |
|
41
|
|
|
|
|
74
|
|
|
41
|
|
|
|
|
1241
|
|
4
|
41
|
|
|
41
|
|
194
|
use base 'Module::Setup::Path::Base'; |
|
41
|
|
|
|
|
58
|
|
|
41
|
|
|
|
|
3170
|
|
5
|
|
|
|
|
|
|
|
6
|
41
|
|
|
41
|
|
206
|
use Path::Class; |
|
41
|
|
|
|
|
64
|
|
|
41
|
|
|
|
|
2629
|
|
7
|
|
|
|
|
|
|
|
8
|
41
|
|
|
41
|
|
214
|
use Module::Setup::Path::Config; |
|
41
|
|
|
|
|
51
|
|
|
41
|
|
|
|
|
872
|
|
9
|
41
|
|
|
41
|
|
166
|
use Module::Setup::Path::Flavor; |
|
41
|
|
|
|
|
70
|
|
|
41
|
|
|
|
|
1023
|
|
10
|
41
|
|
|
41
|
|
15924
|
use Module::Setup::Path::Flavors; |
|
41
|
|
|
|
|
72
|
|
|
41
|
|
|
|
|
1066
|
|
11
|
41
|
|
|
41
|
|
206
|
use Module::Setup::Path::Plugins; |
|
41
|
|
|
|
|
180
|
|
|
41
|
|
|
|
|
12146
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
97
|
|
|
97
|
0
|
421
|
my($class, @path) = @_; |
15
|
97
|
|
|
|
|
693
|
my $self = $class->SUPER::new(@path); |
16
|
|
|
|
|
|
|
|
17
|
97
|
|
|
|
|
308
|
$self->{flavor} = undef; |
18
|
97
|
|
|
|
|
208
|
$self->{flavor_name} = undef; |
19
|
97
|
|
|
|
|
518
|
$self->{flavors} = Module::Setup::Path::Flavors->new($self->path_to('flavors')); |
20
|
97
|
|
|
|
|
690
|
$self->{global_plugins} = Module::Setup::Path::Plugins->new($self->path_to('plugins')); |
21
|
97
|
|
|
|
|
702
|
$self->{global_config} = Module::Setup::Path::Config->new($self->path_to('config.yaml')); |
22
|
|
|
|
|
|
|
|
23
|
97
|
|
|
|
|
470
|
$self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub set_flavor { |
27
|
111
|
|
|
111
|
0
|
234
|
my($self, $flavor) = @_; |
28
|
111
|
|
|
|
|
240
|
$self->{flavor_name} = $flavor; |
29
|
111
|
|
|
|
|
554
|
$self->{flavor} = Module::Setup::Path::Flavor->new($self->path_to('flavors', $flavor)); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
1421
|
|
|
1421
|
0
|
4972
|
sub flavor { shift->{flavor} } |
33
|
132
|
|
|
132
|
0
|
586
|
sub flavors { shift->{flavors} } |
34
|
3
|
|
|
3
|
0
|
26
|
sub global_config { shift->{global_config} } |
35
|
227
|
|
|
227
|
0
|
4114
|
sub global_plugins { shift->{global_plugins} } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub is_initialized { |
38
|
99
|
|
|
99
|
0
|
146
|
my $self = shift; |
39
|
99
|
100
|
|
|
|
440
|
$self->is_dir && $self->global_plugins->is_dir; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub init_directories { |
43
|
43
|
|
|
43
|
0
|
79
|
my $self = shift; |
44
|
43
|
|
|
|
|
147
|
$self->path->mkpath; |
45
|
43
|
|
|
|
|
4134
|
$self->global_plugins->path->mkpath; |
46
|
43
|
|
|
|
|
6341
|
$self->flavors->path->mkpath; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |