blib/lib/SOAP/WSDL/XSD/Builtin.pm

filter: Statementstmt 76.4% 26 / 34 Branchbran 25.0% 2 / 8 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 63.1% 36 / 57 CC 8 SCAR 24.0
CC
8
Cov
65%
serialize
16.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.0
« blib/lib/SOAP/WSDL/Generator/PrefixResolver.pm ↑ Summary blib/lib/SOAP/WSDL/Server.pm »
1 package SOAP::WSDL::XSD::Builtin;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use base qw(SOAP::WSDL::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = 3.004;
8  
9 # only used in SOAP::WSDL - will be obsolete once SOAP::WSDL uses the
10 # generative approach, too
11  
12 1 ▶sub serialize {
Subroutine serialize: called CC=8 SCAR=27.7
Pod undocumented
13 1 my ($self, $name, $value, $opt) = @_;
14 1 my $xml;
15 1 ▶ $opt->{ indent } ||= "";
Condition50%1/2
$opt->{"indent"} ||= ""
l!l
01
MC/DC0%0/1
$opt->{"indent"} ||= ""
$opt->{"indent"}
Truth table50%1/2
A
A= $opt->{"indent"}
Aresult
11
00
16 1 ▶ $opt->{ attributes } ||= [];
Condition50%1/2
$opt->{"attributes"} ||= []
l!l
01
MC/DC0%0/1
$opt->{"attributes"} ||= []
$opt->{"attributes"}
Truth table50%1/2
A
A= $opt->{"attributes"}
Aresult
11
00
17  
18 1 ▶ $xml .= $opt->{ indent } if ($opt->{ readable });
Branch: 1 branch
BranchTrueFalseTotal
if $opt->{"readable"} 0 1 1
19 1 $xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
20 1 ▶ if ( $opt->{ autotype }) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt->{"autotype"}) 1 0 1
21 1 my $ns = $self->get_targetNamespace();
22 1 my %prefix_of = reverse %{ $opt->{ namespace } };
23 1 ▶ my $prefix = $prefix_of{ $ns }
Condition50%1/2
$prefix_of{$ns} || die('No prefix found for namespace ' . $ns)
l!l
01
MC/DC0%0/1
$prefix_of{$ns} || die('No prefix found for namespace ' . $ns)
$prefix_of{$ns}
Truth table50%1/2
A
A= $prefix_of{$ns}
Aresult
11
00
24 || die 'No prefix found for namespace '. $ns;
25 0 $xml .= ' type="' . $prefix . ':'
26 . $self->get_name() . '"';
27 }
28  
29 0 ▶ if (defined $value) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) { } 0 0 0
30 0 $xml .= '>';
31 0 $xml .= "$value";
32 0 $xml .= '</' . $name . '>' ;
33 }
34 else {
35 0 $xml .= '/>';
36 }
37 0 ▶ $xml .= "\n" if ($opt->{ readable });
Branch: 1 branch
BranchTrueFalseTotal
if $opt->{"readable"} 0 0 0
38 0 return $xml;
39 }
40  
41 2 1;
« blib/lib/SOAP/WSDL/Generator/PrefixResolver.pm ↑ Summary blib/lib/SOAP/WSDL/Server.pm »