| 1 | 9 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | package Net::Etcd::Config; | ||||||||||
| 3 | |||||||||||
| 4 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 9 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 9 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | Net::Etcd::Config | ||||||||||
| 13 | |||||||||||
| 14 | =cut | ||||||||||
| 15 | |||||||||||
| 16 | 9 | our $VERSION = '0.022'; | |||||||||
| 17 | |||||||||||
| 18 | =head1 ACCESSORS | ||||||||||
| 19 | |||||||||||
| 20 | =head2 etcd | ||||||||||
| 21 | |||||||||||
| 22 | =cut | ||||||||||
| 23 | |||||||||||
| 24 | 9 | has etcd => ( is => 'lazy' ); | |||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub _build_etcd { | ||||||||
|
Subroutine
_build_etcd: not called CC=2 SCAR=17.9
| |||||||||||
| 27 | 0 | my $self = shift; | |||||||||
| 28 | 0 | my $found = `which etcd`; | |||||||||
| 29 | 0 | ▶ | if ( $? == 0 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | chomp($found); | |||||||||
| 31 | 0 | return $found; | |||||||||
| 32 | } | ||||||||||
| 33 | 0 | return; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | =head2 configuration | ||||||||||
| 37 | |||||||||||
| 38 | =cut | ||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | sub configuration { | ||||||||
|
Subroutine
configuration: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 41 | 0 | return Net::Etcd::Config->new; | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | =head2 configure | ||||||||||
| 45 | |||||||||||
| 46 | =cut | ||||||||||
| 47 | |||||||||||
| 48 | 0 | ▶ | sub configure { | ||||||||
|
Subroutine
configure: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 49 | 0 | my $class = shift; | |||||||||
| 50 | 0 | my $code = shift; | |||||||||
| 51 | 0 | local $_ = $class->configuration; | |||||||||
| 52 | 0 | $code->($_); | |||||||||
| 53 | 0 | return; | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | 9 | 1; | |||||||||