Etcd/Config.pm

filter: Statementstmt 60.0% 18 / 30 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 2 / 2 totaltotal 59.5% 25 / 42 SCAR 8.5
CC
2
Cov
56%
_build_etcd
6.0
configuration
2.0
configure
2.0
CRAP 2.3
« Etcd/KV/Compare.pm ↑ Summary Etcd/User.pm »
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.020';
17  
18 =head1 ACCESSORS
19  
20 =head2 etcd
21  
22 =cut
23  
24 9 has etcd => ( is => 'lazy' );
25  
26 sub _build_etcd {
27 0 ▶ my $self = shift;
Subroutine _build_etcd: not called CC=2 SCAR=17.9
28 0 my $found = `which etcd`;
29 0 ▶ if ( $? == 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($? == 0) 0 0 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 ▶ return Net::Etcd::Config->new;
Subroutine configuration: not called CC=1 SCAR=6.9
Pod documented
42 }
43  
44 =head2 configure
45  
46 =cut
47  
48 sub configure {
49 0 ▶ my $class = shift;
Subroutine configure: not called CC=1 SCAR=6.9
Pod documented
50 0 my $code = shift;
51 0 local $_ = $class->configuration;
52 0 $code->($_);
53 0 return;
54 }
55  
56 9 1;
« Etcd/KV/Compare.pm ↑ Summary Etcd/User.pm »