line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ============================================================================ |
2
|
|
|
|
|
|
|
package MooseX::App::Plugin::ConfigHome::Meta::Class; |
3
|
|
|
|
|
|
|
# ============================================================================ |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1079
|
use 5.010; |
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
7
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
25
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
84
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5427
|
use File::HomeDir qw(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
12
|
1
|
|
|
1
|
|
5
|
use File::Spec qw(); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
223
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
around 'proto_config' => sub { |
15
|
|
|
|
|
|
|
my $orig = shift; |
16
|
|
|
|
|
|
|
my ($self,$command_class,$result,$errors) = @_; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
unless (defined $result->{config}) { |
19
|
|
|
|
|
|
|
my $data_dir = File::Spec->catfile( |
20
|
|
|
|
|
|
|
File::HomeDir->my_home, |
21
|
|
|
|
|
|
|
'.'.$self->app_base |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
foreach my $extension (Config::Any->extensions) { |
24
|
|
|
|
|
|
|
my $check_file = File::Spec->catfile( |
25
|
|
|
|
|
|
|
$data_dir, |
26
|
|
|
|
|
|
|
'config.'.$extension |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
if (-e $check_file) { |
29
|
|
|
|
|
|
|
$result->{config} = $check_file; |
30
|
|
|
|
|
|
|
last; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
return $self->$orig($command_class,$result,$errors); |
36
|
|
|
|
|
|
|
}; |
37
|
|
|
|
|
|
|
1; |