line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ============================================================================ |
2
|
|
|
|
|
|
|
package MooseX::App::Plugin::ConfigHome; |
3
|
|
|
|
|
|
|
# ============================================================================ |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
9076
|
use 5.010; |
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
7
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
31
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
9
|
1
|
|
|
1
|
|
110
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
10
|
|
|
|
|
|
|
with qw(MooseX::App::Plugin::Config); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub plugin_metaroles { |
13
|
0
|
|
|
0
|
0
|
|
my ($self,$class) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
return { |
16
|
0
|
|
|
|
|
|
class => [ |
17
|
|
|
|
|
|
|
'MooseX::App::Plugin::Config::Meta::Class', |
18
|
|
|
|
|
|
|
'MooseX::App::Plugin::ConfigHome::Meta::Class' |
19
|
|
|
|
|
|
|
], |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding utf8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
MooseX::App::Plugin::ConfigHome - Config files in users home directory |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
In your base class: |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package MyApp; |
38
|
|
|
|
|
|
|
use MooseX::App qw(ConfigHome); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Works just like L<MooseX::App::Plugin::Config> but assumes that the config |
43
|
|
|
|
|
|
|
file always resides in the user's home directory. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
~/.${app-base}/config.(yml|xml|ini|...) |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |