blib/lib/SOAP/WSDL/Types.pm

filter: Statementstmt 81.2% 39 / 48 Branchbran 50.0% 6 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 0.0% 0 / 4 totaltotal 72.9% 54 / 74 CC 10 SCAR 18.4
CC
10
Cov
75%
find_type
20.0
find_element
4.2
find_attribute
4.0
CRAP 6.3
« blib/lib/SOAP/WSDL/Factory/Transport.pm ↑ Summary blib/lib/SOAP/WSDL/XSD/Typelib/Attribute.pm »
1 package SOAP::WSDL::Types;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use SOAP::WSDL::XSD::Schema::Builtin;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base qw(SOAP::WSDL::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use version; our $VERSION = qv('3.00.0_2');
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 my %schema_of :ATTR(:name<schema> :default<[]>);
11  
12 sub START {
13 1 ▶ my ($self, $ident, $args_of) = @_;
Subroutine START: called CC=1 SCAR=0.0
Pod undocumented
14 1 $self->push_schema( SOAP::WSDL::XSD::Schema::Builtin->new() );
15 1 return $self;
16 }
17  
18 sub find_type {
19 0 ▶ my ($self, $ns, $name) = @_;
Subroutine find_type: not called CC=4 SCAR=30.0
Pod undocumented
20 0 ▶ ($ns, $name) = @{ $ns } if ref $ns; # allow passing list refs
Branch: 1 branch
BranchTrueFalseTotal
if ref $ns 0 0 0
21 0 foreach my $schema (@{ $schema_of{ ident $self } }) {
22 0 my $type = $schema->find_type($ns, $name);
23 0 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 0 0 0
24 }
25 0 return;
26 }
27  
28 sub find_attribute {
29 3 ▶ my ($self, $ns, $name) = @_;
Subroutine find_attribute: called CC=4 SCAR=13.9
Pod undocumented
30 3 ▶ ($ns, $name) = @{ $ns } if ref $ns; # allow passing list refs
Branch: 1 branch
BranchTrueFalseTotal
if ref $ns 1 2 3
31 3 foreach my $schema (@{ $schema_of{ ident $self } }) {
32 6 my $type = $schema->find_attribute($ns, $name);
33 6 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 2 4 6
34 }
35 1 return;
36 }
37  
38 sub find_element {
39 1 ▶ my ($self, $ns, $name) = @_;
Subroutine find_element: called CC=4 SCAR=14.5
Pod undocumented
40 1 ▶ ($ns, $name) = @{ $ns } if ref $ns; # allow passing list refs
Branch: 1 branch
BranchTrueFalseTotal
if ref $ns 0 1 1
41 1 foreach my $schema (@{ $schema_of{ ident $self } }) {
42 2 my $type = $schema->find_element($ns, $name);
43 2 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 0 2 2
44 }
45 1 return;
46 }
47  
48 1 1;
« blib/lib/SOAP/WSDL/Factory/Transport.pm ↑ Summary blib/lib/SOAP/WSDL/XSD/Typelib/Attribute.pm »