line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
34
|
use utf8; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
35
|
|
2
|
|
|
|
|
|
|
package Etcd3::Config; |
3
|
|
|
|
|
|
|
|
4
|
5
|
|
|
5
|
|
187
|
use strict; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
96
|
|
5
|
5
|
|
|
5
|
|
22
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
115
|
|
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
29
|
use Moo; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
29
|
|
8
|
5
|
|
|
5
|
|
1707
|
use namespace::clean; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
27
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Etcd3::Config |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.007'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 ACCESSORS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 etcd |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has etcd => ( is => 'lazy' ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _build_etcd { |
27
|
0
|
|
|
0
|
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
my $found = `which etcd`; |
29
|
0
|
0
|
|
|
|
|
if ( $? == 0 ) { |
30
|
0
|
|
|
|
|
|
chomp($found); |
31
|
0
|
|
|
|
|
|
return $found; |
32
|
|
|
|
|
|
|
} |
33
|
0
|
|
|
|
|
|
return; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 configuration |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub configuration { |
41
|
0
|
|
|
0
|
1
|
|
return Etcd3::Config->new; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 configure |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub configure { |
49
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
50
|
0
|
|
|
|
|
|
my $code = shift; |
51
|
0
|
|
|
|
|
|
local $_ = $class->configuration; |
52
|
0
|
|
|
|
|
|
$code->($_); |
53
|
0
|
|
|
|
|
|
return; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |