| 1 | 2 | ▶ | use v5.36; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 2 | ▶ | use feature 'class'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | no warnings 'experimental::class'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | class Azure::SDK::AppConfiguration::SnapshotFilter { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | field $key :param :reader; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | field $label :param :reader = undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 12 | ▶ | ADJUST { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 12 | _validate_filter('key', $key, 1); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 12 | ▶ | _validate_filter('label', $label, 0) if defined $label; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 20 | ▶ | sub _validate_filter ($name, $value, $required) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_validate_filter: called CC=10 SCAR=30.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 20 | ▶ | croak "App Configuration snapshot filter $name is required" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition44%4/9
$required and !defined($value) || ref $value || !length($value)
not defined $value or ref $value or not length $value
not defined $value or ref $value
MC/DC0%0/4
$required and !defined($value) || ref $value || !length($value)
$required
not defined $value
ref $value
not length $value
Truth table40%2/5
A and not(B) or C or not(D)
A= $requiredB= not defined $valueC= ref $valueD= not length $value
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | if $required && (!defined $value || ref $value || !length $value); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 20 | ▶ | croak "App Configuration snapshot filter $name must be a non-empty scalar" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
not defined $value or ref $value or not length $value
not defined $value or ref $value
MC/DC0%0/3
not defined $value or ref $value or not length $value
not defined $value
ref $value
not length $value
Truth table25%1/4
not(A) or B or not(C)
A= not defined $valueB= ref $valueC= not length $value
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | if !defined $value || ref $value || !length $value; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 20 | ▶ | croak "App Configuration snapshot filter $name contains control characters" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | if $value =~ /[\x00-\x1f\x7f]/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 20 | ▶ | croak "App Configuration snapshot filter $name exceeds 1024 characters" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | if length $value > 1024; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||