Consul/ACL.pm

filter: Statementstmt 88.0% 22 / 25 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 1 totaltotal 65.8% 27 / 41 CC 5 SCAR 26.6
CC
5
Cov
67%
_build__json
30.0
to_json
2.0
BEGIN
1.0
CRAP 14.3
« Consul/Session.pm ↑ Summary Consul/Check.pm »
1 package Consul::ACL;
2 9 $Consul::ACL::VERSION = '0.027';
3 9 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 9 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 9 ▶use Types::Standard qw(Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 9 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use JSON::MaybeXS;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 has name => ( is => 'ro', isa => Str );
11 9 has id => ( is => 'ro', isa => Str );
12 9 has type => ( is => 'ro', isa => Str );
13 9 has rules => ( is => 'ro', isa => Str );
14  
15 0 ▶sub to_json { shift->_json }
Subroutine to_json: not called CC=1 SCAR=6.9
Pod undocumented
16 9 has _json => ( is => 'lazy', isa => Str );
17 0 ▶sub _build__json {
Subroutine _build__json: not called CC=5 SCAR=34.0
18 0 my ($self) = @_;
19 0 ▶ encode_json({
Branch: 4 branches
BranchTrueFalseTotal
defined $self->name ? : 0 0 0
defined $self->id ? : 0 0 0
defined $self->type ? : 0 0 0
defined $self->rules ? : 0 0 0
20 defined $self->name ? ( Name => $self->name ) : (),
21 defined $self->id ? ( ID => $self->id ) : (),
22 defined $self->type ? ( Type => $self->type ) : (),
23 defined $self->rules ? ( Rules => $self->rules ) : (),
24 });
25 }
26  
27 9 1;
« Consul/Session.pm ↑ Summary Consul/Check.pm »