| 1 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | 6 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | package MetaPOD::Format::JSON::does::v1; | ||||||||||||||||||||||||||||
| 5 | 6 | ▶ | BEGIN { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 6 | $MetaPOD::Format::JSON::does::v1::AUTHORITY = 'cpan:KENTNL'; | |||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||
| 8 | { | ||||||||||||||||||||||||||||
| 9 | 6 | $MetaPOD::Format::JSON::does::v1::VERSION = '0.3.0'; | |||||||||||||||||||||||||||
| 10 | } | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | # ABSTRACT: Implementation of JSON/does format component | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 6 | ▶ | use Moo::Role; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 6 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 3 | ▶ | sub add_does { | ||||||||||||||||||||||||||
|
Subroutine
add_does: called CC=5 SCAR=17.3
Pod
documented
| |||||||||||||||||||||||||||||
| 20 | 3 | my ( $self, $does, $result ) = @_; | |||||||||||||||||||||||||||
| 21 | 3 | ▶ | if ( defined $does and not ref $does ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $does and not ref $does
MC/DC50%1/2
defined $does and not ref $does
defined $does
not ref $does
Truth table66%2/3
A and not(B)
A= defined $doesB= not ref $does
| |||||||||||||||||||||||||||||
| 22 | 1 | return $result->add_does($does); | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | 2 | ▶ | if ( defined $does and ref $does eq 'ARRAY' ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $does and ref $does eq "ARRAY"
MC/DC0%0/2
defined $does and ref $does eq "ARRAY"
defined $does
ref $does eq "ARRAY"
Truth table33%1/3
A and B
A= defined $doesB= ref $does eq "ARRAY"
| |||||||||||||||||||||||||||||
| 25 | 2 | return $result->add_does( @{$does} ); | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | 0 | croak 'Unsupported reftype ' . ref $does; | |||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 6 | 1; | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||||||||||