blib/lib/SOAP/WSDL/Generator/PrefixResolver.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 52.9% 18 / 34 CC 4 SCAR 24.7
CC
4
Cov
52%
resolve_prefix
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« blib/lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm ↑ Summary blib/lib/SOAP/WSDL/XSD/Builtin.pm »
1 package SOAP::WSDL::Generator::PrefixResolver;
2 2 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 2 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = 3.004;
7  
8 2 my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
9 2 my %namespace_map_of :ATTR(:name<namespace_map> :default<{}>);
10 2 my %prefix_of :ATTR(:name<prefix> :default<{}>);
11  
12 0 ▶sub resolve_prefix {
Subroutine resolve_prefix: not called CC=4 SCAR=30.0
Pod documented
13 0 my ($self, $type, $namespace, $element) = @_;
14 0 my $prefix;
15 0 ▶ if (not defined($namespace)) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $namespace) { } 0 0 0
16 0 $prefix = $prefix_of{ $$self }->{ $type }
17 }
18 else {
19 $prefix = $namespace_prefix_map_of{ $$self }->{ $namespace }
20 || ( ($namespace_map_of{ $$self }->{ $namespace })
21 ? join ('::', $prefix_of{ $$self }->{ $type }, $namespace_map_of{ $$self }->{ $namespace })
22 0 ▶ : $prefix_of{ $$self }->{ $type }
Branch: 1 branch
BranchTrueFalseTotal
$namespace_map_of{$$self}{$namespace} ? : 0 0 0
Condition0%0/3
$namespace_prefix_map_of{$$self}{$namespace} || ($namespace_map_of{$$self}{$namespace} ? join('::', $prefix_of{$$self}{$type}, $namespace_map_of{$$self}{$namespace}) : $prefix_of{$$self}{$type})
l!l&&r!l&&!r
000
MC/DC0%0/2
$namespace_prefix_map_of{$$self}{$namespace} || ($namespace_map_of{$$self}{$namespace} ? join('::', $prefix_of{$$self}{$type}, $namespace_map_of{$$self}{$namespace}) : $prefix_of{$$self}{$type})
$namespace_prefix_map_of{$$self}{$namespace} ($namespace_map_of{$$self}{$namespace} ? join('::', $prefix_of{$$self}{$type}, $namespace_map_of{$$self}{$namespace}) : $prefix_of{$$self}{$type})
Truth table0%0/3
A || B
A= $namespace_prefix_map_of{$$self}{$namespace}B= ($namespace_map_of{$$self}{$namespace} ? join('::', $prefix_of{$$self}{$type}, $namespace_map_of{$$self}{$namespace}) : $prefix_of{$$self}{$type})
ABresult
1X1
011
000
23 );
24 }
25 0 return "${prefix}::";
26 }
27  
28 2 1;
29  
30 __END__
« blib/lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm ↑ Summary blib/lib/SOAP/WSDL/XSD/Builtin.pm »