| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bot::Cobalt::Conf; |
|
2
|
|
|
|
|
|
|
$Bot::Cobalt::Conf::VERSION = '0.021003'; |
|
3
|
4
|
|
|
4
|
|
42227
|
use strictures 2; |
|
|
4
|
|
|
|
|
2168
|
|
|
|
4
|
|
|
|
|
152
|
|
|
4
|
4
|
|
|
4
|
|
669
|
use Carp; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
202
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
681
|
use Bot::Cobalt::Common ':types'; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1461
|
use Bot::Cobalt::Conf::File::Core; |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
110
|
|
|
9
|
4
|
|
|
4
|
|
1721
|
use Bot::Cobalt::Conf::File::Channels; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
84
|
|
|
10
|
4
|
|
|
4
|
|
1415
|
use Bot::Cobalt::Conf::File::Plugins; |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
97
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
4
|
|
|
4
|
|
18
|
use Path::Tiny; |
|
|
4
|
|
|
|
|
4
|
|
|
|
4
|
|
|
|
|
148
|
|
|
13
|
4
|
|
|
4
|
|
14
|
use Types::Path::Tiny -types; |
|
|
4
|
|
|
|
|
5
|
|
|
|
4
|
|
|
|
|
16
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
4
|
|
|
4
|
|
2210
|
use Scalar::Util 'blessed'; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
139
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
4
|
|
|
4
|
|
14
|
use Moo; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
12
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has etc => ( |
|
21
|
|
|
|
|
|
|
required => 1, |
|
22
|
|
|
|
|
|
|
is => 'rw', |
|
23
|
|
|
|
|
|
|
isa => Path, |
|
24
|
|
|
|
|
|
|
coerce => 1, |
|
25
|
|
|
|
|
|
|
); |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has debug => ( |
|
28
|
|
|
|
|
|
|
is => 'rw', |
|
29
|
|
|
|
|
|
|
isa => Bool, |
|
30
|
3
|
|
|
3
|
|
19942
|
builder => sub { 0 } |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has path_to_core_cf => ( |
|
34
|
|
|
|
|
|
|
lazy => 1, |
|
35
|
|
|
|
|
|
|
is => 'rwp', |
|
36
|
|
|
|
|
|
|
isa => Path, |
|
37
|
|
|
|
|
|
|
coerce => 1, |
|
38
|
|
|
|
|
|
|
builder => sub { |
|
39
|
2
|
|
|
2
|
|
3084
|
path( shift->etc .'/cobalt.conf' ) |
|
40
|
|
|
|
|
|
|
}, |
|
41
|
|
|
|
|
|
|
); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has path_to_channels_cf => ( |
|
44
|
|
|
|
|
|
|
lazy => 1, |
|
45
|
|
|
|
|
|
|
is => 'rwp', |
|
46
|
|
|
|
|
|
|
isa => Path, |
|
47
|
|
|
|
|
|
|
coerce => 1, |
|
48
|
|
|
|
|
|
|
builder => sub { |
|
49
|
2
|
|
|
2
|
|
2109
|
path( shift->etc .'/channels.conf' ) |
|
50
|
|
|
|
|
|
|
}, |
|
51
|
|
|
|
|
|
|
); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has path_to_plugins_cf => ( |
|
54
|
|
|
|
|
|
|
lazy => 1, |
|
55
|
|
|
|
|
|
|
is => 'rwp', |
|
56
|
|
|
|
|
|
|
isa => Path, |
|
57
|
|
|
|
|
|
|
coerce => 1, |
|
58
|
|
|
|
|
|
|
builder => sub { |
|
59
|
2
|
|
|
2
|
|
1491
|
path( shift->etc .'/plugins.conf' ) |
|
60
|
|
|
|
|
|
|
}, |
|
61
|
|
|
|
|
|
|
); |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has core => ( |
|
65
|
|
|
|
|
|
|
lazy => 1, |
|
66
|
|
|
|
|
|
|
is => 'ro', |
|
67
|
|
|
|
|
|
|
predicate => 'has_core', |
|
68
|
|
|
|
|
|
|
writer => 'set_core', |
|
69
|
|
|
|
|
|
|
isa => InstanceOf['Bot::Cobalt::Conf::File::Core'], |
|
70
|
|
|
|
|
|
|
builder => sub { |
|
71
|
2
|
|
|
2
|
|
1733
|
my ($self) = @_; |
|
72
|
2
|
|
|
|
|
8
|
Bot::Cobalt::Conf::File::Core->new( |
|
73
|
|
|
|
|
|
|
debug => $self->debug, |
|
74
|
|
|
|
|
|
|
cfg_path => $self->path_to_core_cf, |
|
75
|
|
|
|
|
|
|
) |
|
76
|
|
|
|
|
|
|
}, |
|
77
|
|
|
|
|
|
|
); |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
has channels => ( |
|
80
|
|
|
|
|
|
|
lazy => 1, |
|
81
|
|
|
|
|
|
|
is => 'ro', |
|
82
|
|
|
|
|
|
|
predicate => 'has_channels', |
|
83
|
|
|
|
|
|
|
writer => 'set_channels', |
|
84
|
|
|
|
|
|
|
isa => InstanceOf['Bot::Cobalt::Conf::File::Channels'], |
|
85
|
|
|
|
|
|
|
builder => sub { |
|
86
|
2
|
|
|
2
|
|
2236
|
my ($self) = @_; |
|
87
|
2
|
|
|
|
|
33
|
Bot::Cobalt::Conf::File::Channels->new( |
|
88
|
|
|
|
|
|
|
debug => $self->debug, |
|
89
|
|
|
|
|
|
|
cfg_path => $self->path_to_channels_cf, |
|
90
|
|
|
|
|
|
|
) |
|
91
|
|
|
|
|
|
|
}, |
|
92
|
|
|
|
|
|
|
); |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
has plugins => ( |
|
95
|
|
|
|
|
|
|
lazy => 1, |
|
96
|
|
|
|
|
|
|
is => 'ro', |
|
97
|
|
|
|
|
|
|
predicate => 'has_plugins', |
|
98
|
|
|
|
|
|
|
writer => 'set_plugins', |
|
99
|
|
|
|
|
|
|
isa => InstanceOf['Bot::Cobalt::Conf::File::Plugins'], |
|
100
|
|
|
|
|
|
|
builder => sub { |
|
101
|
2
|
|
|
2
|
|
1435
|
my ($self) = @_; |
|
102
|
2
|
|
|
|
|
31
|
Bot::Cobalt::Conf::File::Plugins->new( |
|
103
|
|
|
|
|
|
|
debug => $self->debug, |
|
104
|
|
|
|
|
|
|
cfg_path => $self->path_to_plugins_cf, |
|
105
|
|
|
|
|
|
|
etcdir => $self->etc, |
|
106
|
|
|
|
|
|
|
) |
|
107
|
|
|
|
|
|
|
}, |
|
108
|
|
|
|
|
|
|
); |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
1; |
|
112
|
|
|
|
|
|
|
__END__ |