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

filter: Statementstmt 100% 34 / 34 Branchbran 86.3% 19 / 22 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 6 totaltotal 87.8% 65 / 74 CC 12 SCAR 15.5
CC
12
Cov
95%
start_tag
9.2
end_tag
4.0
BEGIN
1.0
CRAP 4.7
« blib/lib/SOAP/WSDL/XSD/Typelib/Attribute.pm ↑ Summary blib/lib/SOAP/WSDL/Serializer/XSD.pm »
1 package SOAP::WSDL::XSD::Typelib::Builtin::anyType;
2 82 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 82 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 82 ▶use Class::Std::Fast::Storable constructor => 'none';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 82 ▶use version; our $VERSION = qv('3.00.0_2');
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 11 ▶sub get_xmlns { 'http://www.w3.org/2001/XMLSchema' };
Subroutine get_xmlns: called CC=1 SCAR=0.0
Pod undocumented
9  
10 # start_tag creates a XML start tag either for a XML element or a attribute.
11 # The method is highly optimized for performance:
12 # - operates on @_
13 # - uses no private variables
14 # - uses no blocks
15  
16 sub start_tag {
17 # return empty string if no second argument ($opt) or no name
18 124 ▶ return q{} if (! $#_);
Subroutine start_tag: called CC=9 SCAR=22.2
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
unless $#_ 1 123 124
19 123 ▶ return q{} if (! exists $_[1]->{ name });
Branch: 1 branch
BranchTrueFalseTotal
unless exists $_[1]{"name"} 77 46 123
20 # return attribute start if it's an attribute
21 46 ▶ return qq{ $_[1]->{name}="} if $_[1]->{ attr };
Branch: 1 branch
BranchTrueFalseTotal
if $_[1]{"attr"} 4 42 46
22 # return with xsi:nil="true" if it is nil
23 return join
24 q{} ,
25 "<$_[1]->{ name }" ,
26 (defined $_[1]->{ xmlns }) ? qq{ xmlns="$_[1]->{ xmlns }"} : (),
27 $_[0]->serialize_attr($_[1]) ,
28 q{ xsi:nil="true"/>}
29 42 ▶ if ($_[1]->{ nil });
Branch: 2 branches
BranchTrueFalseTotal
if $_[1]{"nil"} 1 41 42
defined $_[1]{'xmlns'} ? : 0 1 1
30 # return "empty" start tag if it's empty
31 return join
32 q{},
33 "<$_[1]->{ name }",
34 (defined $_[1]->{ xmlns }) ? qq{ xmlns="$_[1]->{ xmlns }"} : (),
35 $_[0]->serialize_attr($_[1]) ,
36 '/>'
37 41 ▶ if ($_[1]->{ empty });
Branch: 2 branches
BranchTrueFalseTotal
if $_[1]{"empty"} 2 39 41
defined $_[1]{'xmlns'} ? : 0 2 2
38 # return XML element start tag
39 return join
40 q{},
41 "<$_[1]->{ name }",
42 39 ▶ (defined $_[1]->{ xmlns }) ? qq{ xmlns="$_[1]->{ xmlns }"} : (),
Branch: 1 branch
BranchTrueFalseTotal
defined $_[1]{'xmlns'} ? : 0 39 39
43 , $_[0]->serialize_attr($_[1])
44 , '>';
45 }
46  
47 # start_tag creates a XML end tag either for a XML element or a attribute.
48 # The method is highly optimized for performance:
49 # - operates on @_
50 # - uses no private variables
51 # - uses no blocks
52 sub end_tag {
53 # return empty string if no second argument ($opt) or no name
54 112 ▶ return q{} if (! $#_);
Subroutine end_tag: called CC=4 SCAR=13.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
unless $#_ 12 100 112
55 100 ▶ return q{} if (! exists $_[1]->{ name });
Branch: 1 branch
BranchTrueFalseTotal
unless exists $_[1]{"name"} 58 42 100
56 42 ▶ return q{"} if $_[1]->{ attr };
Branch: 1 branch
BranchTrueFalseTotal
if $_[1]{"attr"} 4 38 42
57 38 return "</$_[1]->{name}>";
58 };
59  
60 ▶sub serialize_attr {};
Subroutine serialize_attr: called CC=1 SCAR=0.0
Pod undocumented
61  
62 # sub serialize { q{} };
63  
64 sub serialize_qualified :STRINGIFY {
65 15 ▶ return $_[0]->serialize( { qualified => 1 } );
Subroutine serialize_qualified: called CC=1 SCAR=0.0
Pod undocumented
66 82 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
67  
68 sub as_list :ARRAYIFY {
69 2 ▶ return [ $_[0] ];
Subroutine as_list: called CC=1 SCAR=0.0
Pod undocumented
70 82 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
71  
72 82 Class::Std::initialize(); # make :STRINGIFY overloading work
73  
74 82 1;
75  
« blib/lib/SOAP/WSDL/XSD/Typelib/Attribute.pm ↑ Summary blib/lib/SOAP/WSDL/Serializer/XSD.pm »