| 1 | package WebDyne::Cloudflare::Hyperdrive::Transport; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.020; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use Future::AsyncAwait; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use JSON::PP (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use WebDyne::Cloudflare (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use WebDyne::Cloudflare::Hyperdrive::Codec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | ▶ | use WebDyne::Cloudflare::Hyperdrive::Error; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | our $VERSION='0.001'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 2 | our $HOST_CALL; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | my $json_or=JSON::PP->new()->canonical(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 9 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=17 SCAR=37.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 9 | my ($class, %opt)=@_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 9 | my $scope_hr=$opt{'scope'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 9 | ▶ | die "Hyperdrive transport requires a PAGI scope\n" unless ref($scope_hr) eq 'HASH'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | my $extension_hr=(ref($scope_hr->{'extensions'}) eq 'HASH') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 9 | ▶ | ? $scope_hr->{'extensions'}{'webdyne.cloudflare.hyperdrive'} : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | die "Missing or invalid Hyperdrive capability\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | unless (ref($extension_hr) eq 'HASH')&&defined($extension_hr->{'version'}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | &&!ref($extension_hr->{'version'})&&($extension_hr->{'version'} eq '1') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | &&defined($extension_hr->{'capability'})&&!ref($extension_hr->{'capability'}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 9 | ▶ | &&length($extension_hr->{'capability'})&&(ref($extension_hr->{'bindings'}) eq 'ARRAY'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%7/21
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1 and defined $extension_hr->{"capability"} and not ref $extension_hr->{"capability"} and length $extension_hr->{"capability"} and ref $extension_hr->{"bindings"} eq "ARRAY"
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1 and defined $extension_hr->{"capability"} and not ref $extension_hr->{"capability"} and length $extension_hr->{"capability"}
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1 and defined $extension_hr->{"capability"} and not ref $extension_hr->{"capability"}
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1 and defined $extension_hr->{"capability"}
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"}
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"}
MC/DC0%0/8
ref $extension_hr eq "HASH" and defined $extension_hr->{"version"} and not ref $extension_hr->{"version"} and $extension_hr->{"version"} eq 1 and defined $extension_hr->{"capability"} and not ref $extension_hr->{"capability"} and length $extension_hr->{"capability"} and ref $extension_hr->{"bindings"} eq "ARRAY"
ref $extension_hr eq "HASH"
defined $extension_hr->{"version"}
not ref $extension_hr->{"version"}
$extension_hr->{"version"} eq 1
defined $extension_hr->{"capability"}
not ref $extension_hr->{"capability"}
length $extension_hr->{"capability"}
ref $extension_hr->{"bindings"} eq "ARRAY"
Truth table11%1/9
A and B and not(C) and D and E and not(F) and G and H
A= ref $extension_hr eq "HASH"B= defined $extension_hr->{"version"}C= not ref $extension_hr->{"version"}D= $extension_hr->{"version"} eq 1E= defined $extension_hr->{"capability"}F= not ref $extension_hr->{"capability"}G= length $extension_hr->{"capability"}H= ref $extension_hr->{"bindings"} eq "ARRAY"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 9 | ▶ | my $binding=$opt{'binding'}//'DB'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$opt{"binding"} // "DB"
MC/DC100%1/1
$opt{"binding"} // "DB"
$opt{"binding"}
Truth table100%2/2
A
A= $opt{"binding"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 9 | ▶ | die "Invalid Hyperdrive binding\n" unless !ref($binding)&&($binding=~/\A[A-Z_][A-Z0-9_]*\z/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not ref $binding and $binding =~ /\A[A-Z_][A-Z0-9_]*\z/u
MC/DC0%0/2
not ref $binding and $binding =~ /\A[A-Z_][A-Z0-9_]*\z/u
not ref $binding
$binding =~ /\A[A-Z_][A-Z0-9_]*\z/u
Truth table33%1/3
not(A) and B
A= not ref $bindingB= $binding =~ /\A[A-Z_][A-Z0-9_]*\z/u
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | die "Hyperdrive binding is unavailable\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 9 | ▶ | unless grep { defined($_)&&!ref($_)&&($_ eq $binding) } @{$extension_hr->{'bindings'}}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
defined $_ && !ref($_) && $_ eq $binding
defined $_ and not ref $_
MC/DC33%1/3
defined $_ && !ref($_) && $_ eq $binding
defined $_
not ref $_
$_ eq $binding
Truth table50%2/4
A and not(B) && C
A= defined $_B= not ref $_C= $_ eq $binding
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 8 | return bless({ capability => $extension_hr->{'capability'}, binding => $binding }, $class); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 8 | ▶ | async sub call { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
call: called CC=16 SCAR=31.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 8 | my ($self, $operation, %opt)=@_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 8 | ▶ | die "Invalid Hyperdrive operation\n" unless defined($operation)&&!ref($operation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $operation and not ref $operation and $operation =~ /\A(?:open|query|begin|commit|rollback|disconnect)\z/u
defined $operation and not ref $operation
MC/DC0%0/3
defined $operation and not ref $operation and $operation =~ /\A(?:open|query|begin|commit|rollback|disconnect)\z/u
defined $operation
not ref $operation
$operation =~ /\A(?:open|query|begin|commit|rollback|disconnect)\z/u
Truth table25%1/4
A and not(B) and C
A= defined $operationB= not ref $operationC= $operation =~ /\A(?:open|query|begin|commit|rollback|disconnect)\z/u
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | &&($operation=~/\A(?:open|query|begin|commit|rollback|disconnect)\z/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | die "Cannot override Hyperdrive capability\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 8 | ▶ | if grep { exists($opt{$_}) } qw(version capability binding operation); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | my $wire_hr={ %opt, version => 1, capability => $self->{'capability'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 7 | binding => $self->{'binding'}, operation => $operation }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 7 | $wire_hr=WebDyne::Cloudflare::json_value($wire_hr); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 7 | my $wire=$json_or->encode($wire_hr); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 7 | my $response; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 7 | ▶ | if ($HOST_CALL) { $response=$HOST_CALL->($wire) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 2 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | my $host_cr=*{'WebDyne::Cloudflare::Hyperdrive::Transport::host_call'}{'CODE'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | ▶ | die "Hyperdrive host adapter is not registered\n" unless $host_cr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | $response=$host_cr->($wire); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 7 | my $response_hr=eval { $json_or->decode($response) }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | die "Invalid Hyperdrive host response\n" unless (ref($response_hr) eq 'HASH') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | &&defined($response_hr->{'version'})&&!ref($response_hr->{'version'}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 7 | ▶ | &&($response_hr->{'version'} eq '1')&&JSON::PP::is_bool($response_hr->{'ok'}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%10/12
ref $response_hr eq "HASH" and defined $response_hr->{"version"} and not ref $response_hr->{"version"} and $response_hr->{"version"} eq 1 and JSON::PP::is_bool($response_hr->{"ok"})
ref $response_hr eq "HASH" and defined $response_hr->{"version"} and not ref $response_hr->{"version"} and $response_hr->{"version"} eq 1
ref $response_hr eq "HASH" and defined $response_hr->{"version"} and not ref $response_hr->{"version"}
ref $response_hr eq "HASH" and defined $response_hr->{"version"}
MC/DC60%3/5
ref $response_hr eq "HASH" and defined $response_hr->{"version"} and not ref $response_hr->{"version"} and $response_hr->{"version"} eq 1 and JSON::PP::is_bool($response_hr->{"ok"})
ref $response_hr eq "HASH"
defined $response_hr->{"version"}
not ref $response_hr->{"version"}
$response_hr->{"version"} eq 1
JSON::PP::is_bool($response_hr->{"ok"})
Truth table66%4/6
A and B and not(C) and D and E
A= ref $response_hr eq "HASH"B= defined $response_hr->{"version"}C= not ref $response_hr->{"version"}D= $response_hr->{"version"} eq 1E= JSON::PP::is_bool($response_hr->{"ok"})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 4 | ▶ | if (!$response_hr->{'ok'}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 2 | my $error_hr=$response_hr->{'error'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | die "Invalid Hyperdrive host error\n" unless ref($error_hr) eq 'HASH' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 2 | ▶ | &&defined($error_hr->{'message'})&&!ref($error_hr->{'message'}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
ref $error_hr eq "HASH" and defined $error_hr->{"message"} and not ref $error_hr->{"message"}
ref $error_hr eq "HASH" and defined $error_hr->{"message"}
MC/DC0%0/3
ref $error_hr eq "HASH" and defined $error_hr->{"message"} and not ref $error_hr->{"message"}
ref $error_hr eq "HASH"
defined $error_hr->{"message"}
not ref $error_hr->{"message"}
Truth table25%1/4
A and B and not(C)
A= ref $error_hr eq "HASH"B= defined $error_hr->{"message"}C= not ref $error_hr->{"message"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 2 | die WebDyne::Cloudflare::Hyperdrive::Error->new(%{$error_hr}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 2 | return WebDyne::Cloudflare::Hyperdrive::Codec::result($response_hr->{'result'}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 2 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||