SDK/Storage/Tables/TransactionOperation.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 3 / 6 Conditioncond 40.0% 6 / 15 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 67.2% 41 / 61 CC 9 SCAR 24.7
CC
9
Cov
74%
__ANON__
19.1
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« SDK/Storage/Blobs/SharedKey.pm ↑ Summary SDK/Storage/Tables/Entity.pm »
1 6 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 6 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶no warnings 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 6 ▶use Azure::SDK::Storage::Tables::Entity;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 6 class Azure::SDK::Storage::Tables::TransactionOperation {
8 6 ▶ use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 ▶ use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 6 field $action :param :reader;
12 6 field $entity :param :reader;
13 6 field $if_match :param :reader = undef;
14
15 112 ▶ ADJUST {
Subroutine __ANON__: called CC=9 SCAR=29.5
16 112 ▶ croak 'Table transaction action is invalid'
Branch: 1 branch
BranchTrueFalseTotal
unless defined $action and $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/u 0 112 112
Condition33%1/3
defined $action and $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/u
!ll&&!rl&&r
00112
MC/DC0%0/2
defined $action and $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/u
defined $action $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/u
Truth table33%1/3
A and B
A= defined $actionB= $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/u
ABresult
0X0
100
111
17 unless defined $action
18 && $action =~ /\A(?:insert|replace|merge|delete|insert_or_replace|insert_or_merge)\z/;
19 112 ▶ croak 'Table transaction operation requires an Entity'
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($entity) and $entity->isa("Azure::SDK::Storage::Tables::Entity") 0 112 112
Condition33%1/3
builtin::blessed($entity) and $entity->isa("Azure::SDK::Storage::Tables::Entity")
!ll&&!rl&&r
00112
MC/DC0%0/2
builtin::blessed($entity) and $entity->isa("Azure::SDK::Storage::Tables::Entity")
builtin::blessed($entity) $entity->isa("Azure::SDK::Storage::Tables::Entity")
Truth table33%1/3
A and B
A= builtin::blessed($entity)B= $entity->isa("Azure::SDK::Storage::Tables::Entity")
ABresult
0X0
100
111
20 unless blessed($entity)
21 && $entity->isa('Azure::SDK::Storage::Tables::Entity');
22 112 ▶ croak 'Table transaction if_match must not contain control characters'
Branch: 1 branch
BranchTrueFalseTotal
if defined $if_match and ref $if_match || !length($if_match) || $if_match =~ /[\x00-\x1f\x7f]/u 0 112 112
Condition44%4/9
defined $if_match and ref $if_match || !length($if_match) || $if_match =~ /[\x00-\x1f\x7f]/u
!ll&&!rl&&r
11020
ref $if_match or not length $if_match or $if_match =~ /[\x00-\x1f\x7f]/u
l!l&&r!l&&!r
002
ref $if_match or not length $if_match
l!l&&r!l&&!r
002
MC/DC0%0/4
defined $if_match and ref $if_match || !length($if_match) || $if_match =~ /[\x00-\x1f\x7f]/u
defined $if_match ref $if_match not length $if_match $if_match =~ /[\x00-\x1f\x7f]/u
Truth table40%2/5
A and B or not(C) or D
A= defined $if_matchB= ref $if_matchC= not length $if_matchD= $if_match =~ /[\x00-\x1f\x7f]/u
ABCDresult
0XXX0
10000
11XX1
101X1
10011
23 if defined $if_match
24 && (ref($if_match) || !length($if_match) || $if_match =~ /[\x00-\x1f\x7f]/);
25 }
26 }
27
28 6 1;
29
30 __END__
« SDK/Storage/Blobs/SharedKey.pm ↑ Summary SDK/Storage/Tables/Entity.pm »