SDK/Core/ClientOptions.pm

filter: Statementstmt 100% 51 / 51 Branchbran 100% 2 / 2 Conditioncond 80.0% 8 / 10 MC/DCmcdc 50.0% 3 / 6 Subroutinesub 100% 13 / 13 Podpod 100% 1 / 1 totaltotal 93.9% 78 / 83 CC 6 SCAR 7.1
CC
6
Cov
97%
__ANON__
4.2
build_pipeline
3.0
BEGIN
1.0
CRAP 2.0
« SDK/Core/Policy/Credential.pm ↑ Summary SDK/Core/Response.pm »
1 12 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 12 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 12 ▶no warnings 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 12 ▶use Azure::SDK ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Azure::SDK::Core::Pipeline;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use Azure::SDK::Core::Transport::Default;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 12 ▶use Azure::SDK::Core::Policy::Headers;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 12 ▶use Azure::SDK::Core::Policy::Telemetry;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 12 ▶use Azure::SDK::Core::Policy::Diagnostics;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 12 ▶use Azure::SDK::Core::Policy::Retry;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 12 ▶use Azure::SDK::Core::Policy::Credential;
Subroutine BEGIN: called CC=1 SCAR=0.0
13
14 12 class Azure::SDK::Core::ClientOptions {
15 12 field $api_version :param :reader = '2026-05-08-preview';
16 12 field $diagnostics_enabled :param :reader = 1;
17 12 field $user_agent :param :reader = undef;
18 12 field $max_retries :param :reader = 3;
19 12 field $base_delay :param :reader = 0.5;
20 12 field $default_headers :param :reader = {};
21 12 field $transport :param :reader = undef;
22 12 field $credential :param :reader = undef;
23 12 field $logger :param :reader = undef;
24 12 field $max_response_bytes :param :reader = 64 * 1024 * 1024;
25 12 field $per_call_policies :param :reader = [];
26 12 field $per_try_policies :param :reader = [];
27
28 156 ▶ ADJUST {
Subroutine __ANON__: called CC=4 SCAR=14.3
29 156 ▶ $user_agent //= 'azure-sdk-perl/' . ( $Azure::SDK::VERSION // '0.001' );
Condition75%3/4
$user_agent //= 'azure-sdk-perl/' . ($Azure::SDK::VERSION // "0.001")
l!l
7383
$Azure::SDK::VERSION // "0.001"
l!l
830
MC/DC100%1/1
$user_agent //= 'azure-sdk-perl/' . ($Azure::SDK::VERSION // "0.001")
$user_agent
MC/DC0%0/1
$Azure::SDK::VERSION // "0.001"
$Azure::SDK::VERSION
Truth table100%2/2
A
A= $user_agent
Aresult
11
00
Truth table50%1/2
A
A= $Azure::SDK::VERSION
Aresult
11
00
30 156 ▶ $transport //= Azure::SDK::Core::Transport::Default->new(
Condition66%2/3
$transport //= "Azure::SDK::Core::Transport::Default"->new("max_response_bytes", $max_response_bytes)
l!l&&r!l&&!r
15150
MC/DC0%0/2
$transport //= "Azure::SDK::Core::Transport::Default"->new("max_response_bytes", $max_response_bytes)
$transport "Azure::SDK::Core::Transport::Default"->new("max_response_bytes", $max_response_bytes)
Truth table66%2/3
A //= B
A= $transportB= "Azure::SDK::Core::Transport::Default"->new("max_response_bytes", $max_response_bytes)
ABresult
1X1
011
000
31 max_response_bytes => $max_response_bytes,
32 );
33 }
34
35 72 ▶ method build_pipeline () {
Subroutine build_pipeline: called CC=3 SCAR=11.0
Pod documented
36 72 my @policies = (
37 Azure::SDK::Core::Policy::Headers->new( headers => $default_headers ),
38 Azure::SDK::Core::Policy::Telemetry->new( user_agent => $user_agent ),
39 Azure::SDK::Core::Policy::Diagnostics->new(
40 enabled => $diagnostics_enabled,
41 logger => $logger,
42 ),
43 $per_call_policies->@*,
44 Azure::SDK::Core::Policy::Retry->new(
45 max_retries => $max_retries,
46 base_delay => $base_delay,
47 ),
48 $per_try_policies->@*,
49 );
50
51 72 ▶ push @policies,
Branch: 1 branch
BranchTrueFalseTotal
if defined $credential and $credential->applies_to_request 20 52 72
Condition100%3/3
defined $credential and $credential->applies_to_request
!ll&&!rl&&r
173520
MC/DC100%2/2
defined $credential and $credential->applies_to_request
defined $credential $credential->applies_to_request
Truth table100%3/3
A and B
A= defined $credentialB= $credential->applies_to_request
ABresult
0X0
100
111
52 Azure::SDK::Core::Policy::Credential->new( credential => $credential )
53 if defined $credential && $credential->applies_to_request;
54
55 72 return Azure::SDK::Core::Pipeline->new(
56 policies => \@policies,
57 transport => $transport,
58 );
59 }
60 }
61
62 12 1;
63
64 __END__
« SDK/Core/Policy/Credential.pm ↑ Summary SDK/Core/Response.pm »