OpenTelemetry/Propagator/TextMap.pm

filter: Statementstmt 100% 38 / 38 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 11 / 11 Podpod 40.0% 2 / 5 totaltotal 91.5% 54 / 59 CC 6 SCAR 7.6
CC
6
Cov
98%
extract
4.0
inject
3.0
BEGIN
1.0
CRAP 2.1
« OpenTelemetry/Trace.pm ↑ Summary OpenTelemetry/X.pm »
1 10 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 # ABSTRACT: A context propagator for OpenTelemetry using string key / value pairs
3  
4 10 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package OpenTelemetry::Propagator::TextMap;
7  
8 10 our $VERSION = '0.040';
9  
10 9 ▶sub SETTER {
Subroutine SETTER: called CC=1 SCAR=0.0
Pod documented
11 7 ▶ sub ( $carrier, $key, $value ) { $carrier->{$key} = $value; return }
Subroutine __ANON__: called CC=1 SCAR=0.0
12 9 }
13  
14 9 ▶sub GETTER {
Subroutine GETTER: called CC=1 SCAR=0.0
Pod documented
15 12 ▶ sub ( $carrier, $key ) { $carrier->{$key} }
Subroutine __ANON__: called CC=1 SCAR=0.0
16 9 }
17  
18 7 ▶class OpenTelemetry::Propagator::TextMap :does(OpenTelemetry::Propagator) {
Subroutine BEGIN: called CC=1 SCAR=0.0
19 10 ▶ use OpenTelemetry::Context;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 11 ▶ method inject (
Subroutine inject: called CC=3 SCAR=11.0
Pod undocumented
22 11 $carrier,
23 11 $context = undef,
24 $setter = undef
25 11 ) {
26 11 return $self;
27 10 }
28  
29 2 ▶ method extract (
Subroutine extract: called CC=4 SCAR=13.9
Pod undocumented
30 2 $carrier,
31 2 $context = undef,
32 $getter = undef
33 2 ) {
34 2 ▶ return $context // OpenTelemetry::Context->current;
Condition66%2/3
$context // "OpenTelemetry::Context"->current
l!l&&r!l&&!r
101
MC/DC50%1/2
$context // "OpenTelemetry::Context"->current
$context "OpenTelemetry::Context"->current
Truth table66%2/3
A // B
A= $contextB= "OpenTelemetry::Context"->current
ABresult
1X1
011
000
35 10 }
36  
37 1 ▶ method keys () { }
Subroutine keys: called CC=1 SCAR=0.0
Pod undocumented
38 10 }
« OpenTelemetry/Trace.pm ↑ Summary OpenTelemetry/X.pm »