Consul/Session.pm

filter: Statementstmt 88.8% 24 / 27 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 1 totaltotal 61.7% 29 / 47 CC 7 SCAR 34.2
CC
7
Cov
62%
_build__json
56.0
to_json
2.0
BEGIN
1.0
CRAP 30.7
« Consul/Service.pm ↑ Summary Consul/ACL.pm »
1 package Consul::Session;
2 9 $Consul::Session::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 ArrayRef Enum);
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 behavior => ( is => 'ro', isa => Enum[qw(release delete)] );
12 9 has ttl => ( is => 'ro', isa => Str );
13 9 has node => ( is => 'ro', isa => Str );
14 9 has checks => ( is => 'ro', isa => ArrayRef[Str] );
15 9 has lock_delay => ( is => 'ro', isa => Str );
16  
17 0 ▶sub to_json { shift->_json }
Subroutine to_json: not called CC=1 SCAR=6.9
Pod undocumented
18 9 has _json => ( is => 'lazy', isa => Str );
19 0 ▶sub _build__json {
Subroutine _build__json: not called CC=7 SCAR=40.3
20 0 my ($self) = @_;
21 0 ▶ encode_json({
Branch: 6 branches
BranchTrueFalseTotal
defined $self->lock_delay ? : 0 0 0
defined $self->node ? : 0 0 0
defined $self->name ? : 0 0 0
defined $self->checks ? : 0 0 0
defined $self->behavior ? : 0 0 0
defined $self->ttl ? : 0 0 0
22 defined $self->lock_delay ? ( LockDelay => $self->lock_delay ) : (),
23 defined $self->node ? ( Node => $self->node ) : (),
24 defined $self->name ? ( Name => $self->name ) : (),
25 defined $self->checks ? ( Checks => $self->checks ) : (),
26 defined $self->behavior ? ( Behavior => $self->behavior ) : (),
27 defined $self->ttl ? ( TTL => $self->ttl ) : (),
28 });
29 }
30  
31 9 1;
« Consul/Service.pm ↑ Summary Consul/ACL.pm »