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