lib/SOAP/Lite/Deserializer/XMLSchema1999.pm

filter: Statementstmt 100% 27 / 27 Branchbran 75.0% 3 / 4 Conditioncond 50.0% 3 / 6 MC/DCmcdc 25.0% 1 / 4 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 4 totaltotal 79.6% 43 / 54 CC 6 SCAR 10.4
CC
6
Cov
89%
as_undef
5.7
BEGIN
2.0
BEGIN
1.0
CRAP 2.8
« lib/SOAP/Transport/LOCAL.pm ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm »
1 package SOAP::Lite::Deserializer::XMLSchema1999;
2 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 12 our $VERSION = '1.27'; # VERSION
5  
6 12 ▶use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 66 ▶sub anyTypeValue { 'ur-type' }
Subroutine anyTypeValue: called CC=1 SCAR=0.0
Pod undocumented
9  
10 # use as_string and as_boolean from SOAP1_1 Deserializer
11  
12 12 sub as_string; *as_string = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_string;
13 12 sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_boolean;
14  
15 8 ▶sub as_hex {
Subroutine as_hex: called CC=1 SCAR=0.0
Pod undocumented
16 8 shift;
17 8 my $value = shift;
18 8 $value =~ s/([a-zA-Z0-9]{2})/chr oct '0x'.$1/ge;
19 8 $value
20 }
21  
22 1 ▶sub as_ur_type { $_[1] }
Subroutine as_ur_type: called CC=1 SCAR=0.0
Pod undocumented
23  
24 7 ▶sub as_undef {
Subroutine as_undef: called CC=5 SCAR=17.5
Pod undocumented
25 7 shift;
26 7 my $value = shift;
27 7 ▶ $value eq '1' || $value eq 'true'
Branch: 2 branches
BranchTrueFalseTotal
$value eq '1' || $value eq 'true' ? : 5 2 7
$value eq '0' || $value eq 'false' ? : 2 0 2
Condition50%3/6
$value eq 1 or $value eq "true"
l!l&&r!l&&!r
052
$value eq 0 or $value eq "false"
l!l&&r!l&&!r
020
MC/DC50%1/2
$value eq 1 or $value eq "true"
$value eq 1 $value eq "true"
MC/DC0%0/2
$value eq 0 or $value eq "false"
$value eq 0 $value eq "false"
Truth table66%2/3
A or B
A= $value eq 1B= $value eq "true"
ABresult
1X1
011
000
Truth table33%1/3
A or B
A= $value eq 0B= $value eq "false"
ABresult
1X1
011
000
28 ? 1
29 : $value eq '0' || $value eq 'false'
30 ? 0
31 : die "Wrong null/nil value '$value'\n";
32 }
33  
34 12 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=6.9
35 12 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
36 12 for my $method (qw(
37 float double decimal timeDuration recurringDuration uriReference
38 integer nonPositiveInteger negativeInteger long int short byte
39 nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte
40 positiveInteger timeInstant time timePeriod date month year century
41 recurringDate recurringDay language
42 )) {
43 348 my $name = 'as_' . $method;
44 348 ▶ *$name = sub { $_[1] };
Subroutine __ANON__: called CC=1 SCAR=0.0
45 }
46 }
47  
48 12 1;
« lib/SOAP/Transport/LOCAL.pm ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm »