| 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 //= []
MC/DC100%1/1
$items //= []
$items
Truth table100%2/2
A
A= $items
| |||||||||||||||||||||||||||||
| 13 | 47 | ▶ | croak 'Azure::SDK::Core::Page items must be an array reference' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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
Condition100%3/3
defined $continuation_token and not length $continuation_token
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
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||