line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
30
|
use utf8; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
23
|
|
2
|
|
|
|
|
|
|
package Etcd3::Config; |
3
|
|
|
|
|
|
|
|
4
|
5
|
|
|
5
|
|
160
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
78
|
|
5
|
5
|
|
|
5
|
|
19
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
94
|
|
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
19
|
use Moo; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
24
|
|
8
|
5
|
|
|
5
|
|
1310
|
use namespace::clean; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
26
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Etcd3::Config |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.006'; |
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; |