line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Setup::Path; |
2
|
47
|
|
|
47
|
|
358
|
use strict; |
|
47
|
|
|
|
|
95
|
|
|
47
|
|
|
|
|
1664
|
|
3
|
47
|
|
|
47
|
|
248
|
use warnings; |
|
47
|
|
|
|
|
98
|
|
|
47
|
|
|
|
|
1826
|
|
4
|
47
|
|
|
47
|
|
2025
|
use base 'Module::Setup::Path::Base'; |
|
47
|
|
|
|
|
118
|
|
|
47
|
|
|
|
|
4385
|
|
5
|
|
|
|
|
|
|
|
6
|
47
|
|
|
47
|
|
289
|
use Module::Setup::Path::Config; |
|
47
|
|
|
|
|
195
|
|
|
47
|
|
|
|
|
1840
|
|
7
|
47
|
|
|
47
|
|
313
|
use Module::Setup::Path::Flavor; |
|
47
|
|
|
|
|
98
|
|
|
47
|
|
|
|
|
1317
|
|
8
|
47
|
|
|
47
|
|
29652
|
use Module::Setup::Path::Flavors; |
|
47
|
|
|
|
|
110
|
|
|
47
|
|
|
|
|
1269
|
|
9
|
47
|
|
|
47
|
|
277
|
use Module::Setup::Path::Plugins; |
|
47
|
|
|
|
|
91
|
|
|
47
|
|
|
|
|
18406
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
104
|
|
|
104
|
0
|
577
|
my($class, @path) = @_; |
13
|
104
|
|
|
|
|
1582
|
my $self = $class->SUPER::new(@path); |
14
|
|
|
|
|
|
|
|
15
|
104
|
|
|
|
|
504
|
$self->{flavor} = undef; |
16
|
104
|
|
|
|
|
292
|
$self->{flavor_name} = undef; |
17
|
104
|
|
|
|
|
732
|
$self->{flavors} = Module::Setup::Path::Flavors->new($self->path_to('flavors')); |
18
|
104
|
|
|
|
|
1511
|
$self->{global_plugins} = Module::Setup::Path::Plugins->new($self->path_to('plugins')); |
19
|
104
|
|
|
|
|
17466
|
$self->{global_config} = Module::Setup::Path::Config->new($self->path_to('config.yaml')); |
20
|
|
|
|
|
|
|
|
21
|
104
|
|
|
|
|
889
|
$self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub set_flavor { |
25
|
123
|
|
|
123
|
0
|
340
|
my($self, $flavor) = @_; |
26
|
123
|
|
|
|
|
415
|
$self->{flavor_name} = $flavor; |
27
|
123
|
|
|
|
|
809
|
$self->{flavor} = Module::Setup::Path::Flavor->new($self->path_to('flavors', $flavor)); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1565
|
|
|
1565
|
0
|
8909
|
sub flavor { shift->{flavor} } |
31
|
142
|
|
|
142
|
0
|
1057
|
sub flavors { shift->{flavors} } |
32
|
3
|
|
|
3
|
0
|
36
|
sub global_config { shift->{global_config} } |
33
|
252
|
|
|
252
|
0
|
2001
|
sub global_plugins { shift->{global_plugins} } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub is_initialized { |
36
|
106
|
|
|
106
|
0
|
230
|
my $self = shift; |
37
|
106
|
100
|
|
|
|
672
|
$self->is_dir && $self->global_plugins->is_dir; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub init_directories { |
41
|
49
|
|
|
49
|
0
|
117
|
my $self = shift; |
42
|
49
|
|
|
|
|
214
|
$self->path->mkpath; |
43
|
49
|
|
|
|
|
193
|
$self->global_plugins->path->mkpath; |
44
|
49
|
|
|
|
|
293
|
$self->flavors->path->mkpath; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |