| 1 | package Alzabo::Utils; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 12 | ▶ | use Scalar::Util qw( blessed reftype ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | sub safe_can | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
safe_can: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 0 | ▶ | return blessed( $_[0] ) && $_[0]->can( $_[1] ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($_[0]) && $_[0]->can($_[1])
MC/DC0%0/2
builtin::blessed($_[0]) && $_[0]->can($_[1])
builtin::blessed($_[0])
$_[0]->can($_[1])
Truth table0%0/3
A && B
A= builtin::blessed($_[0])B= $_[0]->can($_[1])
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | sub safe_isa | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
safe_isa: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | return blessed( $_[0] ) && $_[0]->isa( $_[1] ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($_[0]) && $_[0]->isa($_[1])
MC/DC0%0/2
builtin::blessed($_[0]) && $_[0]->isa($_[1])
builtin::blessed($_[0])
$_[0]->isa($_[1])
Truth table0%0/3
A && B
A= builtin::blessed($_[0])B= $_[0]->isa($_[1])
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | sub is_arrayref | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_arrayref: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | ▶ | return defined $_[0] && ref $_[0] && reftype $_[0] eq 'ARRAY'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
defined $_[0] && ref $_[0] && builtin::reftype($_[0]) eq 'ARRAY'
defined $_[0] and ref $_[0]
MC/DC0%0/3
defined $_[0] && ref $_[0] && builtin::reftype($_[0]) eq 'ARRAY'
defined $_[0]
ref $_[0]
builtin::reftype($_[0]) eq 'ARRAY'
Truth table0%0/4
A and B && C
A= defined $_[0]B= ref $_[0]C= builtin::reftype($_[0]) eq 'ARRAY'
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | sub is_hashref | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_hashref: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | return defined $_[0] && ref $_[0] && ( ! blessed $_[0] ) && reftype $_[0] eq 'HASH'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
defined $_[0] && ref $_[0] && !builtin::blessed($_[0]) && builtin::reftype($_[0]) eq 'HASH'
defined $_[0] and ref $_[0] and not builtin::blessed($_[0])
defined $_[0] and ref $_[0]
MC/DC0%0/4
defined $_[0] && ref $_[0] && !builtin::blessed($_[0]) && builtin::reftype($_[0]) eq 'HASH'
defined $_[0]
ref $_[0]
not builtin::blessed($_[0])
builtin::reftype($_[0]) eq 'HASH'
Truth table0%0/5
A and B and not(C) && D
A= defined $_[0]B= ref $_[0]C= not builtin::blessed($_[0])D= builtin::reftype($_[0]) eq 'HASH'
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 12 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||