blib/lib/W3C/SOAP/XSD/Document/Element.pm

filter: Statementstmt 77.1% 118 / 153 Branchbran 61.6% 37 / 60 Conditioncond 48.3% 43 / 89 MC/DCmcdc 27.7% 15 / 54 Subroutinesub 85.0% 17 / 20 Podpod 100% 6 / 6 totaltotal 61.7% 236 / 382 CC 67 SCAR 31.9
CC
67
Cov
66%
moosex_type
110.0
_package
42.0
simple_type
15.5
CRAP 24.2
↑ Summary blib/lib/W3C/SOAP/XSD.pm »
1 package W3C::SOAP::XSD::Document::Element;
2  
3 # Created on: 2012-05-26 19:04:09
4 # Create by: Ivan Wills
5 # $Id$
6 # $Revision$, $HeadURL$, $Date$
7 # $Revision$, $Source$, $Date$
8  
9 7 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 7 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 7 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 7 ▶use List::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 #use List::MoreUtils;
15 7 ▶use Data::Dumper qw/Dumper/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 7 ▶use English qw/ -no_match_vars /;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 7 ▶use W3C::SOAP::Utils qw/split_ns xml_error/;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 7 extends 'W3C::SOAP::XSD::Document::Type';
20  
21 7 our $VERSION = 0.13;
22  
23 7 has complex_type => (
24 is => 'rw',
25 isa => 'Str',
26 builder => '_complex_type',
27 lazy => 1,
28 );
29 7 has type => (
30 is => 'rw',
31 isa => 'Str',
32 builder => '_type',
33 lazy => 1,
34 predicate => 'has_type',
35 );
36 7 has package => (
37 is => 'rw',
38 isa => 'Str',
39 builder => '_package',
40 lazy => 1,
41 );
42 7 has max_occurs => (
43 is => 'rw',
44 #isa => 'Str',
45 builder => '_max_occurs',
46 lazy => 1,
47 );
48 7 has min_occurs => (
49 is => 'rw',
50 #isa => 'Str',
51 builder => '_min_occurs',
52 lazy => 1,
53 );
54 7 has nillable => (
55 is => 'rw',
56 isa => 'Bool',
57 builder => '_nillable',
58 lazy => 1,
59 );
60 7 has choice_group => (
61 is => 'rw',
62 isa => 'Int',
63 );
64  
65 sub _complex_type {
66 0 ▶ my ($self) = @_;
Subroutine _complex_type: not called CC=2 SCAR=17.9
67 0 my $complex;
68 0 my @nodes = $self->document->xpc->findnodes('xsd:complexType', $self->node);
69  
70 0 for my $node (@nodes) {
71 }
72  
73 0 return $complex;
74 }
75  
76 sub _type {
77 481 ▶ my ($self) = @_;
Subroutine _type: called CC=10 SCAR=23.0
78 481 my $type = $self->node->getAttribute('type');
79 481 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 450 31 481
80  
81 31 my $simple = $self->document->simple_type;
82 TYPE:
83 31 for my $type (keys %{$simple}) {
84 102 my $node = $simple->{$type}->node;
85 102 my $type_name = $node->parentNode->getAttribute('name');
86 102 ▶ if ( $type_name && $self->name && $type_name eq $self->name ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type_name and $self->name and $type_name eq $self->name) 14 88 102
Condition83%5/6
$type_name and $self->name and $type_name eq $self->name
!ll&&!rl&&r
286014
$type_name and $self->name
!ll&&!rl&&r
28074
MC/DC66%2/3
$type_name and $self->name and $type_name eq $self->name
$type_name $self->name $type_name eq $self->name
Truth table75%3/4
A and B and C
A= $type_nameB= $self->nameC= $type_name eq $self->name
ABCresult
0XX0
10X0
1100
1111
87 14 my @children = $self->document->xpc->findnodes('xsd:restriction', $node);
88 14 ▶ last if @children != 1;
Branch: 1 branch
BranchTrueFalseTotal
if @children != 1 0 14 14
89  
90 14 my $child = $children[0]->firstChild;
91 14 ▶ while ($child) {
Branch: 1 branch
BranchTrueFalseTotal
if ($child) 12 10 22
92 12 ▶ last TYPE if $child->nodeName !~ /^[#]/xms;
Branch: 1 branch
BranchTrueFalseTotal
unless $child->nodeName =~ /^[#]/msx 4 8 12
93 8 $child = $child->nextSibling;
94 }
95  
96 10 return $children[0]->getAttribute('base');
97 }
98 88 ▶ $type_name ||= '';
Condition100%2/2
$type_name ||= ""
l!l
6028
MC/DC100%1/1
$type_name ||= ""
$type_name
Truth table100%2/2
A
A= $type_name
Aresult
11
00
99 }
100  
101 21 return $self->has_anonymous;
102 }
103  
104 sub _package {
105 0 ▶ my ($self) = @_;
Subroutine _package: not called CC=6 SCAR=37.4
106 0 my $type = $self->type;
107 0 my ($ns, $name) = split_ns($type);
108 0 ▶ $ns ||= $self->document->ns_name;
Condition0%0/3
$ns ||= $self->document->ns_name
l!l&&r!l&&!r
000
MC/DC0%0/2
$ns ||= $self->document->ns_name
$ns $self->document->ns_name
Truth table0%0/3
A ||= B
A= $nsB= $self->document->ns_name
ABresult
1X1
011
000
109 0 ▶ my $ns_uri = $name ? $self->document->get_ns_uri($ns, $self->node) : '';
Branch: 1 branch
BranchTrueFalseTotal
$name ? : 0 0 0
110 0 ▶ $name ||= $ns;
Condition0%0/3
$name ||= $ns
l!l&&r!l&&!r
000
MC/DC0%0/2
$name ||= $ns
$name $ns
Truth table0%0/3
A ||= B
A= $nameB= $ns
ABresult
1X1
011
000
111  
112 0 ▶ if ( $ns_uri eq 'http://www.w3.org/2001/XMLSchema' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ns_uri eq "http://www.w3.org/2001/XMLSchema") 0 0 0
113 0 return "xs:$name";
114 }
115  
116 0 ▶ my $base = $self->document->get_module_name( $ns_uri || $self->document->target_namespace );
Condition0%0/3
$ns_uri || $self->document->target_namespace
l!l&&r!l&&!r
000
MC/DC0%0/2
$ns_uri || $self->document->target_namespace
$ns_uri $self->document->target_namespace
Truth table0%0/3
A || B
A= $ns_uriB= $self->document->target_namespace
ABresult
1X1
011
000
117  
118 0 return $base . '::' . $name;
119 }
120  
121 sub _max_occurs {
122 481 ▶ my ($self) = @_;
Subroutine _max_occurs: called CC=2 SCAR=6.9
123 481 ▶ return $self->node->getAttribute('maxOccurs') || 1;
Condition100%2/2
$self->node->getAttribute('maxOccurs') || 1
l!l
33448
MC/DC100%1/1
$self->node->getAttribute('maxOccurs') || 1
$self->node->getAttribute('maxOccurs')
Truth table100%2/2
A
A= $self->node->getAttribute('maxOccurs')
Aresult
11
00
124 }
125  
126 sub _min_occurs {
127 481 ▶ my ($self) = @_;
Subroutine _min_occurs: called CC=2 SCAR=6.9
128 481 ▶ return $self->node->getAttribute('minOccurs') || 0;
Condition100%2/2
$self->node->getAttribute('minOccurs') || 0
l!l
44437
MC/DC100%1/1
$self->node->getAttribute('minOccurs') || 0
$self->node->getAttribute('minOccurs')
Truth table100%2/2
A
A= $self->node->getAttribute('minOccurs')
Aresult
11
00
129 }
130  
131 sub _nillable {
132 481 ▶ my ($self) = @_;
Subroutine _nillable: called CC=4 SCAR=13.9
133 481 my $nillable = $self->node->getAttribute('nillable');
134  
135 481 ▶ return !$nillable ? 1
Branch: 3 branches
BranchTrueFalseTotal
!$nillable ? : 465 16 481
$nillable eq 'true' ? : 6 10 16
$nillable eq 'false' ? : 10 0 10
136 : $nillable eq 'true' ? 1
137 : $nillable eq 'false' ? 0
138 : die "Unknown value for attribute nillable in ".$self->node->toString;
139 }
140  
141 sub module {
142 89 ▶ my ($self) = @_;
Subroutine module: called CC=1 SCAR=0.0
Pod documented
143  
144 89 return $self->document->module;
145 }
146  
147 sub type_module {
148 245 ▶ my ($self) = @_;
Subroutine type_module: called CC=3 SCAR=11.8
Pod documented
149 245 my ($ns, $type) = split_ns($self->type);
150 245 ▶ $ns ||= $self->document->ns_name;
Condition33%1/3
$ns ||= $self->document->ns_name
l!l&&r!l&&!r
24500
MC/DC0%0/2
$ns ||= $self->document->ns_name
$ns $self->document->ns_name
Truth table33%1/3
A ||= B
A= $nsB= $self->document->ns_name
ABresult
1X1
011
000
151 245 my $ns_uri = $self->document->get_ns_uri($ns, $self->node);
152  
153 245 ▶ return $self->simple_type || $self->document->get_module_name( $ns_uri ) . '::' . $type;
Condition50%1/2
$self->simple_type || $self->document->get_module_name($ns_uri) . '::' . $type
l!l
0245
MC/DC0%0/1
$self->simple_type || $self->document->get_module_name($ns_uri) . '::' . $type
$self->simple_type
Truth table50%1/2
A
A= $self->simple_type
Aresult
11
00
154 }
155  
156 sub simple_type {
157 1983 ▶ my ($self) = @_;
Subroutine simple_type: called CC=12 SCAR=27.4
Pod documented
158 1983 $self->document->simple_type();
159 1983 my ($ns, $type) = split_ns($self->type);
160 1983 ▶ $ns ||= $self->document->ns_name;
Condition33%1/3
$ns ||= $self->document->ns_name
l!l&&r!l&&!r
198300
MC/DC0%0/2
$ns ||= $self->document->ns_name
$ns $self->document->ns_name
Truth table33%1/3
A ||= B
A= $nsB= $self->document->ns_name
ABresult
1X1
011
000
161 return "xs:$type"
162 if $self->document->ns_map->{$ns}
163 1983 ▶ && $self->document->ns_map->{$ns} eq 'http://www.w3.org/2001/XMLSchema';
Branch: 1 branch
BranchTrueFalseTotal
if $self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema" 1335 648 1983
Condition66%2/3
$self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
!ll&&!rl&&r
06481335
MC/DC50%1/2
$self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
$self->document->ns_map->{$ns} $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
Truth table66%2/3
A and B
A= $self->document->ns_map->{$ns}B= $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
ABresult
0X0
100
111
164  
165 648 my $ns_uri = $self->document->get_ns_uri($ns, $self->node);
166 648 ▶ warn "Simple type missing a type for '".$self->type."'\n".xml_error($self->node)."\n"
Branch: 1 branch
BranchTrueFalseTotal
if not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema" 0 648 648
Condition33%1/3
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
!ll&&!rl&&r
64800
MC/DC0%0/2
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
not $ns $ns_uri ne "http://www.w3.org/2001/XMLSchema"
Truth table33%1/3
not(A) and B
A= not $nsB= $ns_uri ne "http://www.w3.org/2001/XMLSchema"
ABresult
0X0
100
111
167 if !$ns && $ns_uri ne 'http://www.w3.org/2001/XMLSchema';
168  
169 648 ▶ return "xs:$type" if $ns_uri eq 'http://www.w3.org/2001/XMLSchema';
Branch: 1 branch
BranchTrueFalseTotal
if $ns_uri eq "http://www.w3.org/2001/XMLSchema" 0 648 648
170  
171 648 my @xsds = ($self->document);
172 648 ▶ while ( my $xsd = shift @xsds ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $xsd = shift @xsds) 749 520 1269
173 749 my $simple = $xsd->simple_type;
174 749 ▶ if ( !$simple && @{ $xsd->simple_types } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $simple and @{$xsd->simple_types;}) 0 749 749
Condition33%1/3
not $simple and @{$xsd->simple_types;}
!ll&&!rl&&r
74900
MC/DC0%0/2
not $simple and @{$xsd->simple_types;}
not $simple @{$xsd->simple_types;}
Truth table33%1/3
not(A) and B
A= not $simpleB= @{$xsd->simple_types;}
ABresult
0X0
100
111
175 0 $simple = $xsd->simple_type($xsd->_simple_type);
176 #warn $xsd->target_namespace . " $type => $simple\n" if $type eq 'GetCreateUIDResponseDto';
177 }
178  
179 749 ▶ return $simple->{$type}->moose_type if $simple && $simple->{$type};
Branch: 1 branch
BranchTrueFalseTotal
if $simple and $simple->{$type} 128 621 749
Condition66%2/3
$simple and $simple->{$type}
!ll&&!rl&&r
0621128
MC/DC50%1/2
$simple and $simple->{$type}
$simple $simple->{$type}
Truth table66%2/3
A and B
A= $simpleB= $simple->{$type}
ABresult
0X0
100
111
180  
181 621 push @xsds, @{$xsd->imports};
182 }
183 520 return;
184 }
185  
186 sub very_simple_type {
187 481 ▶ my ($self) = @_;
Subroutine very_simple_type: called CC=12 SCAR=27.4
Pod documented
188 481 $self->document->simple_type();
189 481 my ($ns, $type) = split_ns($self->type);
190 481 ▶ $ns ||= $self->document->ns_name;
Condition33%1/3
$ns ||= $self->document->ns_name
l!l&&r!l&&!r
48100
MC/DC0%0/2
$ns ||= $self->document->ns_name
$ns $self->document->ns_name
Truth table33%1/3
A ||= B
A= $nsB= $self->document->ns_name
ABresult
1X1
011
000
191 481 ▶ return "xs:$type" if $self->document->ns_map->{$ns} && $self->document->ns_map->{$ns} eq 'http://www.w3.org/2001/XMLSchema';
Branch: 1 branch
BranchTrueFalseTotal
if $self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema" 357 124 481
Condition66%2/3
$self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
!ll&&!rl&&r
0124357
MC/DC50%1/2
$self->document->ns_map->{$ns} and $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
$self->document->ns_map->{$ns} $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
Truth table66%2/3
A and B
A= $self->document->ns_map->{$ns}B= $self->document->ns_map->{$ns} eq "http://www.w3.org/2001/XMLSchema"
ABresult
0X0
100
111
192  
193 124 my $ns_uri = $self->document->get_ns_uri($ns, $self->node);
194 124 ▶ warn "Simple type missing a type for '".$self->type."'\n".xml_error($self->node)."\n"
Branch: 1 branch
BranchTrueFalseTotal
if not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema" 0 124 124
Condition33%1/3
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
!ll&&!rl&&r
12400
MC/DC0%0/2
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
not $ns $ns_uri ne "http://www.w3.org/2001/XMLSchema"
Truth table33%1/3
not(A) and B
A= not $nsB= $ns_uri ne "http://www.w3.org/2001/XMLSchema"
ABresult
0X0
100
111
195 if !$ns && $ns_uri ne 'http://www.w3.org/2001/XMLSchema';
196  
197 124 ▶ return "xs:$type" if $ns_uri eq 'http://www.w3.org/2001/XMLSchema';
Branch: 1 branch
BranchTrueFalseTotal
if $ns_uri eq "http://www.w3.org/2001/XMLSchema" 0 124 124
198  
199 124 my @xsds = ($self->document);
200 124 ▶ while ( my $xsd = shift @xsds ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $xsd = shift @xsds) 148 87 235
201 148 my $simple = $xsd->simple_type;
202 148 ▶ if ( !$simple && @{ $xsd->simple_types } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $simple and @{$xsd->simple_types;}) 0 148 148
Condition33%1/3
not $simple and @{$xsd->simple_types;}
!ll&&!rl&&r
14800
MC/DC0%0/2
not $simple and @{$xsd->simple_types;}
not $simple @{$xsd->simple_types;}
Truth table33%1/3
not(A) and B
A= not $simpleB= @{$xsd->simple_types;}
ABresult
0X0
100
111
203 0 $simple = $xsd->simple_type($xsd->_simple_type);
204 }
205  
206 148 ▶ return $simple->{$type}->type if $simple && $simple->{$type};
Branch: 1 branch
BranchTrueFalseTotal
if $simple and $simple->{$type} 37 111 148
Condition66%2/3
$simple and $simple->{$type}
!ll&&!rl&&r
011137
MC/DC50%1/2
$simple and $simple->{$type}
$simple $simple->{$type}
Truth table66%2/3
A and B
A= $simpleB= $simple->{$type}
ABresult
0X0
100
111
207  
208 111 push @xsds, @{$xsd->imports};
209 }
210 87 return;
211 }
212  
213 sub moosex_type {
214 0 ▶ my ($self) = @_;
Subroutine moosex_type: not called CC=10 SCAR=47.0
Pod documented
215 0 my ($ns, $type) = split_ns($self->type);
216 0 ▶ $ns ||= $self->document->ns_name;
Condition0%0/3
$ns ||= $self->document->ns_name
l!l&&r!l&&!r
000
MC/DC0%0/2
$ns ||= $self->document->ns_name
$ns $self->document->ns_name
Truth table0%0/3
A ||= B
A= $nsB= $self->document->ns_name
ABresult
1X1
011
000
217 0 my $ns_uri = $self->document->get_ns_uri($ns, $self->node);
218 0 ▶ warn "Simple type missing a type for '".$self->type."'\n".xml_error($self->node)."\n"
Branch: 1 branch
BranchTrueFalseTotal
if not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema" 0 0 0
Condition0%0/3
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
!ll&&!rl&&r
000
MC/DC0%0/2
not $ns and $ns_uri ne "http://www.w3.org/2001/XMLSchema"
not $ns $ns_uri ne "http://www.w3.org/2001/XMLSchema"
Truth table0%0/3
not(A) and B
A= not $nsB= $ns_uri ne "http://www.w3.org/2001/XMLSchema"
ABresult
0X0
100
111
219 if !$ns && $ns_uri ne 'http://www.w3.org/2001/XMLSchema';
220  
221 0 ▶ return "'xs:$type'" if $ns_uri eq 'http://www.w3.org/2001/XMLSchema';
Branch: 1 branch
BranchTrueFalseTotal
if $ns_uri eq "http://www.w3.org/2001/XMLSchema" 0 0 0
222  
223 0 my @xsds = ($self->document);
224 0 ▶ while ( my $xsd = shift @xsds ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $xsd = shift @xsds) 0 0 0
225 0 my $simple = $xsd->simple_type;
226 0 ▶ if ( !$simple && @{ $xsd->simple_types } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $simple and @{$xsd->simple_types;}) 0 0 0
Condition0%0/3
not $simple and @{$xsd->simple_types;}
!ll&&!rl&&r
000
MC/DC0%0/2
not $simple and @{$xsd->simple_types;}
not $simple @{$xsd->simple_types;}
Truth table0%0/3
not(A) and B
A= not $simpleB= @{$xsd->simple_types;}
ABresult
0X0
100
111
227 0 $simple = $xsd->simple_type($xsd->_simple_type);
228 #warn $xsd->target_namespace . " $type => $simple\n" if $type eq 'GetCreateUIDResponseDto';
229 }
230  
231 0 ▶ return $simple->{$type}->moosex_type if $simple && $simple->{$type};
Branch: 1 branch
BranchTrueFalseTotal
if $simple and $simple->{$type} 0 0 0
Condition0%0/3
$simple and $simple->{$type}
!ll&&!rl&&r
000
MC/DC0%0/2
$simple and $simple->{$type}
$simple $simple->{$type}
Truth table0%0/3
A and B
A= $simpleB= $simple->{$type}
ABresult
0X0
100
111
232  
233 0 push @xsds, @{$xsd->imports};
234 }
235 0 return;
236 }
237  
238 sub has_anonymous {
239 21 ▶ my ($self) = @_;
Subroutine has_anonymous: called CC=14 SCAR=26.7
Pod documented
240 21 ▶ return if $self->has_type && $self->type;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_type and $self->type 0 21 21
Condition33%1/3
$self->has_type and $self->type
!ll&&!rl&&r
2100
MC/DC0%0/2
$self->has_type and $self->type
$self->has_type $self->type
Truth table33%1/3
A and B
A= $self->has_typeB= $self->type
ABresult
0X0
100
111
241  
242 21 my %map = reverse %{ $self->document->ns_map };
243  
244 21 my $simple = $self->document->simple_type;
245 21 for my $type (keys %{$simple}) {
246 74 my $type_name = $simple->{$type}->node->parentNode->getAttribute('name');
247 74 ▶ if ( $type_name && $self->name && $type_name eq $self->name ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type_name and $self->name and $type_name eq $self->name) 4 70 74
Condition83%5/6
$type_name and $self->name and $type_name eq $self->name
!ll&&!rl&&r
25454
$type_name and $self->name
!ll&&!rl&&r
25049
MC/DC66%2/3
$type_name and $self->name and $type_name eq $self->name
$type_name $self->name $type_name eq $self->name
Truth table75%3/4
A and B and C
A= $type_nameB= $self->nameC= $type_name eq $self->name
ABCresult
0XX0
10X0
1100
1111
248 4 return $map{$self->document->target_namespace} . ':' . $type;
249 }
250 70 ▶ $type_name ||= '';
Condition100%2/2
$type_name ||= ""
l!l
4525
MC/DC100%1/1
$type_name ||= ""
$type_name
Truth table100%2/2
A
A= $type_name
Aresult
11
00
251 }
252  
253 17 my $complex = $self->document->complex_type;
254 17 for my $type (keys %{$complex}) {
255 43 my $type_name = $complex->{$type}->node->parentNode->getAttribute('name');
256 43 ▶ if ( $type_name && $self->name && $type_name eq $self->name ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type_name and $self->name and $type_name eq $self->name) 15 28 43
Condition83%5/6
$type_name and $self->name and $type_name eq $self->name
!ll&&!rl&&r
161215
$type_name and $self->name
!ll&&!rl&&r
16027
MC/DC66%2/3
$type_name and $self->name and $type_name eq $self->name
$type_name $self->name $type_name eq $self->name
Truth table75%3/4
A and B and C
A= $type_nameB= $self->nameC= $type_name eq $self->name
ABCresult
0XX0
10X0
1100
1111
257 15 return $map{$self->document->target_namespace} . ':' . $type;
258 }
259 28 ▶ $type_name ||= '';
Condition100%2/2
$type_name ||= ""
l!l
1216
MC/DC100%1/1
$type_name ||= ""
$type_name
Truth table100%2/2
A
A= $type_name
Aresult
11
00
260 }
261  
262 2 ▶ $self->document->ns_map->{xs} ||= 'http://www.w3.org/2001/XMLSchema';
Condition50%1/2
$self->document->ns_map->{"xs"} ||= "http://www.w3.org/2001/XMLSchema"
l!l
20
MC/DC0%0/1
$self->document->ns_map->{"xs"} ||= "http://www.w3.org/2001/XMLSchema"
$self->document->ns_map->{"xs"}
Truth table50%1/2
A
A= $self->document->ns_map->{"xs"}
Aresult
11
00
263 2 return 'xs:string';
264 }
265  
266 7 1;
267  
268 __END__
269  
270 =head1 NAME
271  
272 W3C::SOAP::XSD::Document::Element - XML Schema Element
273  
274 =head1 VERSION
275  
276 This documentation refers to W3C::SOAP::XSD::Document::Element version 0.13.
277  
278  
279 =head1 SYNOPSIS
280  
281 use W3C::SOAP::XSD::Document::Element;
282  
283 # Brief but working code example(s) here showing the most common usage(s)
284 # This section will be as far as many users bother reading, so make it as
285 # educational and exemplary as possible.
286  
287  
288 =head1 DESCRIPTION
289  
290  
291 =head1 SUBROUTINES/METHODS
292  
293 =over 4
294  
295 =item C<module ()>
296  
297 =item C<type_module ()>
298  
299 =item C<very_simple_type ()>
300  
301 =item C<simple_type ()>
302  
303 =item C<moosex_type ()>
304  
305 =item C<has_anonymous ()>
306  
307 =back
308  
309 =head1 DIAGNOSTICS
310  
311 =head1 CONFIGURATION AND ENVIRONMENT
312  
313 =head1 DEPENDENCIES
314  
315 =head1 INCOMPATIBILITIES
316  
317 =head1 BUGS AND LIMITATIONS
318  
319 There are no known bugs in this module.
320  
321 Please report problems to Ivan Wills (ivan.wills@gmail.com).
322  
323 Patches are welcome.
324  
325 =head1 AUTHOR
326  
327 Ivan Wills - (ivan.wills@gmail.com)
328  
329 =head1 LICENSE AND COPYRIGHT
330  
331 Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
332 All rights reserved.
333  
334 This module is free software; you can redistribute it and/or modify it under
335 the same terms as Perl itself. See L<perlartistic>. This program is
336 distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
337 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
338 PARTICULAR PURPOSE.
339  
340 =cut
↑ Summary blib/lib/W3C/SOAP/XSD.pm »