SDK/Core/Page.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 6 / 6 Conditioncond 100% 5 / 5 MC/DCmcdc 100% 3 / 3 Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 100% 44 / 44 CC 6 SCAR 10.4
CC
6
Cov
100%
__ANON__
5.0
has_more
2.0
BEGIN
1.0
CRAP 2.8
« SDK/Core/Credential/SharedKey.pm ↑ Summary SDK/Core/Pipeline.pm »
1 13 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 13 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 13 ▶no warnings 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 13 class Azure::SDK::Core::Page {
6 13 ▶ use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 13 field $items :param :reader = undef;
9 13 field $continuation_token :param :reader = undef;
10
11 47 ▶ ADJUST {
Subroutine __ANON__: called CC=5 SCAR=16.1
12 47 ▶ $items //= [];
Condition100%2/2
$items //= []
l!l
443
MC/DC100%1/1
$items //= []
$items
Truth table100%2/2
A
A= $items
Aresult
11
00
13 47 ▶ croak 'Azure::SDK::Core::Page items must be an array reference'
Branch: 1 branch
BranchTrueFalseTotal
unless ref $items eq "ARRAY" 1 46 47
14 unless ref $items eq 'ARRAY';
15
16 # Every Azure list API signals "last page" with an empty token rather
17 # than by omitting it. Normalizing to undef here means callers test one
18 # condition instead of two, and subclasses inherit that guarantee.
19 46 ▶ $continuation_token = undef
Branch: 1 branch
BranchTrueFalseTotal
if defined $continuation_token and not length $continuation_token 2 44 46
Condition100%3/3
defined $continuation_token and not length $continuation_token
!ll&&!rl&&r
21232
MC/DC100%2/2
defined $continuation_token and not length $continuation_token
defined $continuation_token not length $continuation_token
Truth table100%3/3
A and not(B)
A= defined $continuation_tokenB= not length $continuation_token
ABresult
0X0
100
111
20 if defined $continuation_token && !length $continuation_token;
21 }
22
23 10 ▶ method has_more () {
Subroutine has_more: called CC=2 SCAR=6.9
Pod documented
24 10 ▶ return defined $continuation_token ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
defined $continuation_token ? : 6 4 10
25 }
26
27 51 ▶ method count () {
Subroutine count: called CC=1 SCAR=0.0
Pod documented
28 51 return scalar @{$items};
29 }
30 }
31
32 13 1;
33
34 __END__
« SDK/Core/Credential/SharedKey.pm ↑ Summary SDK/Core/Pipeline.pm »