line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
45
|
use utf8; |
|
9
|
|
|
|
|
14
|
|
|
9
|
|
|
|
|
39
|
|
2
|
|
|
|
|
|
|
package Net::Etcd::Config; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
275
|
use strict; |
|
9
|
|
|
|
|
11
|
|
|
9
|
|
|
|
|
179
|
|
5
|
9
|
|
|
9
|
|
32
|
use warnings; |
|
9
|
|
|
|
|
14
|
|
|
9
|
|
|
|
|
160
|
|
6
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
29
|
use Moo; |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
190
|
|
8
|
9
|
|
|
9
|
|
2176
|
use namespace::clean; |
|
9
|
|
|
|
|
148
|
|
|
9
|
|
|
|
|
56
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::Etcd::Config |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.022'; |
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 Net::Etcd::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; |