line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
64
|
use utf8; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
67
|
|
2
|
|
|
|
|
|
|
package Net::Etcd::Config; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
405
|
use strict; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
228
|
|
5
|
9
|
|
|
9
|
|
52
|
use warnings; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
268
|
|
6
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
53
|
use Moo; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
313
|
|
8
|
9
|
|
|
9
|
|
3633
|
use namespace::clean; |
|
9
|
|
|
|
|
176
|
|
|
9
|
|
|
|
|
88
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::Etcd::Config |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.021'; |
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; |