blib/lib/SOAP/WSDL/Types.pm

filter: Statementstmt 80.0% 36 / 45 Branchbran 50.0% 6 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 4 totaltotal 71.4% 50 / 70 CC 10 SCAR 18.9
CC
10
Cov
74%
find_type
20.0
find_element
4.2
find_attribute
4.0
CRAP 6.6
« lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm ↑ Summary blib/lib/SOAP/WSDL/Server/CGI.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 our $VERSION = 3.004;
9  
10 1 my %schema_of :ATTR(:name<schema> :default<[]>);
11  
12 1 ▶sub START {
Subroutine START: called CC=1 SCAR=0.0
Pod undocumented
13 1 my ($self, $ident, $args_of) = @_;
14 1 $self->push_schema( SOAP::WSDL::XSD::Schema::Builtin->new() );
15 1 return $self;
16 }
17  
18 0 ▶sub find_type {
Subroutine find_type: not called CC=4 SCAR=30.0
Pod undocumented
19 0 my ($self, $ns, $name) = @_;
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 3 ▶sub find_attribute {
Subroutine find_attribute: called CC=4 SCAR=13.9
Pod undocumented
29 3 my ($self, $ns, $name) = @_;
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 1 ▶sub find_element {
Subroutine find_element: called CC=4 SCAR=14.5
Pod undocumented
39 1 my ($self, $ns, $name) = @_;
40 0 ▶ ($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;
« lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm ↑ Summary blib/lib/SOAP/WSDL/Server/CGI.pm »