lib/XML/Compile/Transport/SOAPHTTP.pm

filter: Statementstmt 81.2% 152 / 187 Branchbran 36.3% 24 / 66 Conditioncond 41.4% 17 / 41 MC/DCmcdc 0.0% 0 / 23 Subroutinesub 83.3% 25 / 30 Podpod 60.0% 3 / 5 totaltotal 62.7% 221 / 352 CC 54 SCAR 32.7
CC
54
Cov
66%
_prepare_call
81.0
__ANON__
20.0
__ANON__
20.0
CRAP 26.3
« lib/XML/Compile/SOAP/Trace.pm ↑ Summary lib/XML/Compile/SOAP/Client.pm »
1 # Copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.03.
5 # This code is part of distribution XML-Compile-SOAP. Meta-POD processed
6 # with OODoc into POD and HTML manual-pages. See README.md
7 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
8  
9 package XML::Compile::Transport::SOAPHTTP;
10 3 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 $VERSION = '3.28';
12  
13 3 ▶use base 'XML::Compile::Transport';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 3 ▶use Log::Report 'xml-compile-soap';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 3 ▶use XML::Compile::SOAP::Util qw/SOAP11ENV SOAP11HTTP/;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 3 ▶use XML::Compile ();
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 3 ▶use LWP ();
Subroutine BEGIN: called CC=1 SCAR=0.0
24 3 ▶use LWP::UserAgent ();
Subroutine BEGIN: called CC=1 SCAR=0.0
25 3 ▶use HTTP::Request ();
Subroutine BEGIN: called CC=1 SCAR=0.0
26 3 ▶use HTTP::Headers ();
Subroutine BEGIN: called CC=1 SCAR=0.0
27 3 ▶use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 # (Microsofts HTTP Extension Framework)
30 3 my $http_ext_id = SOAP11ENV;
31  
32 3 my $mime_xop = 'application/xop+xml';
33  
34 3 __PACKAGE__->register(SOAP11HTTP);
35  
36  
37 sub init($)
38 2 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=3 SCAR=11.4
Pod undocumented
39 2 $self->SUPER::init($args);
40  
41 $self->userAgent
42 ( $args->{user_agent}
43 , keep_alive => (exists $args->{keep_alive} ? $args->{keep_alive} : 1)
44 , timeout => ($args->{timeout} || 180)
45 , ssl_opts => $args->{ssl_opts}
46 2 ▶ );
Branch: 1 branch
BranchTrueFalseTotal
exists $args->{'keep_alive'} ? : 0 2 2
Condition50%1/2
$args->{'timeout'} || 180
l!l
02
MC/DC0%0/1
$args->{'timeout'} || 180
$args->{'timeout'}
Truth table50%1/2
A
A= $args->{'timeout'}
Aresult
11
00
47  
48 2 $self;
49 }
50  
51 sub initWSDL11($)
52 0 ▶{ my ($class, $wsdl) = @_;
Subroutine initWSDL11: not called CC=1 SCAR=6.9
Pod undocumented
53 0 trace "initialize SOAPHTTP transporter for WSDL11";
54 }
55  
56 #-------------------------------------------
57  
58  
59 3 my $default_ua;
60 sub userAgent(;$)
61 4 ▶{ my ($self, $agent) = (shift, shift);
Subroutine userAgent: called CC=4 SCAR=15.6
Pod documented
62 4 ▶ return $self->{user_agent} = $agent
Branch: 1 branch
BranchTrueFalseTotal
if defined $agent 0 4 4
63 if defined $agent;
64  
65 4 ▶ $self->{user_agent} ||= $default_ua ||= LWP::UserAgent->new
Condition50%3/6
$self->{"user_agent"} ||= ($default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_))
l!l&&r!l&&!r
220
$default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_)
l!l&&r!l&&!r
020
MC/DC0%0/2
$self->{"user_agent"} ||= ($default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_))
$self->{"user_agent"} ($default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_))
MC/DC0%0/2
$default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_)
$default_ua "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_)
Truth table66%2/3
A ||= B
A= $self->{"user_agent"}B= ($default_ua ||= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_))
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $default_uaB= "LWP::UserAgent"->new("requests_redirectable", ["GET", "HEAD", "POST", "M-POST"], "protocols_allowed", ["http", "https"], "parse_head", 0, @_)
ABresult
1X1
011
000
66 ( requests_redirectable => [ qw/GET HEAD POST M-POST/ ]
67 , protocols_allowed => [ qw/http https/ ]
68 , parse_head => 0
69 , @_
70 );
71 }
72  
73  
74 0 ▶sub defaultUserAgent() { $default_ua }
Subroutine defaultUserAgent: not called CC=1 SCAR=6.9
Pod documented
75  
76 #-------------------------------------------
77  
78  
79 # SUPER::compileClient() calls this method to do the real work
80 sub _prepare_call($)
81 2 ▶{ my ($self, $args) = @_;
Subroutine _prepare_call: called CC=22 SCAR=43.9
82 2 ▶ my $method = $args->{method} || 'POST';
Condition50%1/2
$args->{'method'} || 'POST'
l!l
02
MC/DC0%0/1
$args->{'method'} || 'POST'
$args->{'method'}
Truth table50%1/2
A
A= $args->{'method'}
Aresult
11
00
83 2 ▶ my $soap = $args->{soap} || 'SOAP11';
Condition50%1/2
$args->{'soap'} || 'SOAP11'
l!l
02
MC/DC0%0/1
$args->{'soap'} || 'SOAP11'
$args->{'soap'}
Truth table50%1/2
A
A= $args->{'soap'}
Aresult
11
00
84 2 ▶ my $version = ref $soap ? $soap->version : $soap;
Branch: 1 branch
BranchTrueFalseTotal
ref $soap ? : 0 2 2
85 2 ▶ my $mpost_id = $args->{mpost_id} || 42;
Condition50%1/2
$args->{'mpost_id'} || 42
l!l
02
MC/DC0%0/1
$args->{'mpost_id'} || 42
$args->{'mpost_id'}
Truth table50%1/2
A
A= $args->{'mpost_id'}
Aresult
11
00
86 2 my $action = $args->{action};
87 2 my $mime = $args->{mime};
88 2 ▶ my $kind = $args->{kind} || 'request-response';
Condition50%1/2
$args->{'kind'} || 'request-response'
l!l
02
MC/DC0%0/1
$args->{'kind'} || 'request-response'
$args->{'kind'}
Truth table50%1/2
A
A= $args->{'kind'}
Aresult
11
00
89 2 ▶ my $expect = $kind ne 'one-way' && $kind ne 'notification-operation';
Condition33%1/3
$kind ne 'one-way' && $kind ne 'notification-operation'
!ll&&!rl&&r
002
MC/DC0%0/2
$kind ne 'one-way' && $kind ne 'notification-operation'
$kind ne 'one-way' $kind ne 'notification-operation'
Truth table33%1/3
A && B
A= $kind ne 'one-way'B= $kind ne 'notification-operation'
ABresult
0X0
100
111
90  
91 2 my $charset = $self->charset;
92 2 my $ua = $self->userAgent;
93  
94 # Prepare header
95 2 ▶ my $header = $args->{header} || HTTP::Headers->new;
Condition33%1/3
$args->{'header'} || 'HTTP::Headers'->new
l!l&&r!l&&!r
020
MC/DC0%0/2
$args->{'header'} || 'HTTP::Headers'->new
$args->{'header'} 'HTTP::Headers'->new
Truth table33%1/3
A || B
A= $args->{'header'}B= 'HTTP::Headers'->new
ABresult
1X1
011
000
96 2 $self->headerAddVersions($header);
97  
98 # There is probably never a real HTTP server on the other side, but
99 # HTTP/1.1 requires this.
100 $header->header(Host => $1)
101 2 ▶ if +($args->{endpoint} // '') =~ m!^\w+\://([^/:]+)!;
Branch: 1 branch
BranchTrueFalseTotal
if ($args->{"endpoint"} // "") =~ m[^\w+\://([^/:]+)] 0 2 2
Condition50%1/2
$args->{"endpoint"} // ""
l!l
02
MC/DC0%0/1
$args->{"endpoint"} // ""
$args->{"endpoint"}
Truth table50%1/2
A
A= $args->{"endpoint"}
Aresult
11
00
102  
103 2 my $content_type;
104 2 ▶ if($version eq 'SOAP11')
Branch: 2 branches
BranchTrueFalseTotal
if ($version eq 'SOAP11') { } 2 0 2
elsif ($version eq 'SOAP12') { } 0 0 0
105 2 ▶ { $mime ||= 'text/xml';
Condition50%1/2
$mime ||= "text/xml"
l!l
02
MC/DC0%0/1
$mime ||= "text/xml"
$mime
Truth table50%1/2
A
A= $mime
Aresult
11
00
106 2 $content_type = qq{$mime; charset=$charset};
107 }
108 elsif($version eq 'SOAP12')
109 0 ▶ { $mime ||= 'application/soap+xml';
Condition0%0/2
$mime ||= "application/soap+xml"
l!l
00
MC/DC0%0/1
$mime ||= "application/soap+xml"
$mime
Truth table0%0/2
A
A= $mime
Aresult
11
00
110 0 ▶ my $sa = defined $action ? qq{; action="$action"} : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $action ? : 0 0 0
111 0 $content_type = qq{$mime; charset=$charset$sa};
112 0 $header->header(Accept => $mime); # not the HTML answer
113 }
114 else
115 0 { error "SOAP version {version} not implemented", version => $version;
116 }
117  
118 2 ▶ if($method eq 'POST')
Branch: 2 branches
BranchTrueFalseTotal
if ($method eq 'POST') { } 2 0 2
elsif ($method eq 'M-POST') { } 0 0 0
119 { # should only be used by SOAP11, but you never know. So, SOAP12
120 # will have the action both ways.
121 2 ▶ $header->header(SOAPAction => qq{"$action"})
Branch: 1 branch
BranchTrueFalseTotal
if defined $action 0 2 2
122 if defined $action;
123 }
124 elsif($method eq 'M-POST')
125 0 { $header->header(Man => qq{"$http_ext_id"; ns=$mpost_id});
126 0 ▶ $header->header("$mpost_id-SOAPAction", qq{"$action"})
Branch: 1 branch
BranchTrueFalseTotal
if $version eq "SOAP11" 0 0 0
127 if $version eq 'SOAP11';
128 }
129 else
130 0 { error "SOAP method must be POST or M-POST, not {method}"
131 , method => $method;
132 }
133  
134 # Prepare request
135  
136 # Ideally, we should change server when one fails, and stick to that
137 # one as long as possible.
138 2 my $server = $self->address;
139  
140 # Create handler
141  
142 my ($create_message, $parse_message)
143 2 ▶ = exists $INC{'XML/Compile/XOP.pm'}
Branch: 1 branch
BranchTrueFalseTotal
exists $INC{'XML/Compile/XOP.pm'} ? : 1 1 2
144 ? $self->_prepare_xop_call($content_type)
145 : $self->_prepare_simple_call($content_type);
146  
147 2 ▶ $parse_message = $self->_prepare_for_no_answer($parse_message)
Branch: 1 branch
BranchTrueFalseTotal
unless $expect 0 2 2
148 unless $expect;
149  
150 2 my $hook = $args->{hook};
151  
152 $hook
153 ? sub # hooked code
154 2 ▶ { my $trace = $_[1];
Subroutine __ANON__: called CC=5 SCAR=17.1
155  
156 2 my $request = HTTP::Request->new($method => $server, $header);
157 2 $request->protocol('HTTP/1.1');
158 2 $create_message->($request, $_[0], $_[2]);
159
160 2 $trace->{http_request} = $request;
161 2 $trace->{action} = $action;
162 2 $trace->{soap_version} = $version;
163 2 $trace->{server} = $server;
164 2 $trace->{user_agent} = $ua;
165 2 $trace->{hooked} = 1;
166  
167 2 ▶ my $response = $hook->($request, $trace, $self)
Branch: 1 branch
BranchTrueFalseTotal
my $response = &$hook($request, $trace, $self) or return undef 2 0 2
168 or return undef;
169  
170 2 ▶ UNIVERSAL::isa($response, 'HTTP::Response')
Branch: 1 branch
BranchTrueFalseTotal
UNIVERSAL::isa($response, "HTTP::Response") or &error(&__x("transport_hook must produce a HTTP::Response, got {resp}", "resp", $response)) 2 0 2
171 or error __x"transport_hook must produce a HTTP::Response, got {resp}"
172 , resp => $response;
173  
174 2 $trace->{http_response} = $response;
175 2 ▶ if($response->is_error)
Branch: 1 branch
BranchTrueFalseTotal
if ($response->is_error) 0 2 2
176 0 ▶ { error $response->message
Branch: 1 branch
BranchTrueFalseTotal
if $response->header("Client-Warning") 0 0 0
177 if $response->header('Client-Warning');
178  
179 0 warning $response->message;
180 # still try to parse the response for Fault blocks
181 }
182  
183 2 $parse_message->($response);
184 }
185  
186 : sub # real call
187 0 ▶ { my $trace = $_[1];
Subroutine __ANON__: not called CC=4 SCAR=30.0
188  
189 0 my $request = HTTP::Request->new($method => $server, $header);
190 0 $request->protocol('HTTP/1.1');
191 0 $create_message->($request, $_[0], $_[2]);
192  
193 0 $trace->{http_request} = $request;
194  
195 0 ▶ my $response = $ua->request($request)
Branch: 1 branch
BranchTrueFalseTotal
my $response = $ua->request($request) or return undef 0 0 0
196 or return undef;
197  
198 0 $trace->{http_response} = $response;
199  
200 0 ▶ if($response->is_error)
Branch: 1 branch
BranchTrueFalseTotal
if ($response->is_error) 0 0 0
201 0 ▶ { error $response->message
Branch: 1 branch
BranchTrueFalseTotal
if $response->header("Client-Warning") 0 0 0
202 if $response->header('Client-Warning');
203  
204 0 warning $response->message;
205 # still try to parse the response for Fault blocks
206 }
207  
208 0 $parse_message->($response);
209 2 ▶ };
Branch: 1 branch
BranchTrueFalseTotal
$hook ? : 2 0 2
210 }
211  
212 sub _prepare_simple_call($)
213 2 ▶{ my ($self, $content_type) = @_;
Subroutine _prepare_simple_call: called CC=1 SCAR=0.1
214  
215 my $create = sub
216 1 ▶ { my ($request, $content) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
217 1 $request->header(Content_Type => $content_type);
218 1 $request->content_ref($content); # already bytes (not utf-8)
219 3 ▶ use bytes; $request->header('Content-Length' => length $$content);
Subroutine BEGIN: called CC=1 SCAR=0.0
220 2 };
221  
222 my $parse = sub
223 1 ▶ { my $response = shift;
Subroutine __ANON__: called CC=6 SCAR=19.6
224 1 ▶ UNIVERSAL::isa($response, 'HTTP::Response')
Branch: 1 branch
BranchTrueFalseTotal
UNIVERSAL::isa($response, "HTTP::Response") or &error(&__x("no response object received")) 1 0 1
225 or error __x"no response object received";
226  
227 1 ▶ my $ct = $response->content_type || '';
Condition50%1/2
$response->content_type || ''
l!l
10
MC/DC0%0/1
$response->content_type || ''
$response->content_type
Truth table50%1/2
A
A= $response->content_type
Aresult
11
00
228 1 ▶ lc($ct) ne 'multipart/related'
Branch: 1 branch
BranchTrueFalseTotal
lc $ct ne "multipart/related" or &error(&__x("remote system uses XOP, use XML::Compile::XOP")) 1 0 1
229 or error __x"remote system uses XOP, use XML::Compile::XOP";
230
231 1 trace "received ".$response->status_line;
232  
233 1 ▶ $ct =~ m,[/+]xml$,i
Branch: 1 branch
BranchTrueFalseTotal
$ct =~ m[[/+]xml$]i or &error(&__x("answer is not xml but `{type}'", "type", $ct)) 1 0 1
234 or error __x"answer is not xml but `{type}'", type => $ct;
235  
236 # HTTP::Message::decoded_content() does not work for old Perls
237 1 ▶ my $content = $response->decoded_content(ref => 1)
Condition33%1/3
$response->decoded_content('ref', 1) || $response->content('ref', 1)
l!l&&r!l&&!r
100
MC/DC0%0/2
$response->decoded_content('ref', 1) || $response->content('ref', 1)
$response->decoded_content('ref', 1) $response->content('ref', 1)
Truth table33%1/3
A || B
A= $response->decoded_content('ref', 1)B= $response->content('ref', 1)
ABresult
1X1
011
000
238 || $response->content(ref => 1);
239  
240 1 ($content, {});
241 2 };
242  
243 2 ($create, $parse);
244 }
245  
246 sub _prepare_xop_call($)
247 1 ▶{ my ($self, $content_type) = @_;
Subroutine _prepare_xop_call: called CC=1 SCAR=0.1
248  
249 1 my ($simple_create, $simple_parse)
250 = $self->_prepare_simple_call($content_type);
251  
252 1 my $charset = $self->charset;
253 my $create = sub
254 1 ▶ { my ($request, $content, $mtom) = @_;
Subroutine __ANON__: called CC=3 SCAR=11.0
255 1 ▶ $mtom ||= [];
Condition50%1/2
$mtom ||= []
l!l
10
MC/DC0%0/1
$mtom ||= []
$mtom
Truth table50%1/2
A
A= $mtom
Aresult
11
00
256 1 ▶ @$mtom or return $simple_create->($request, $content);
Branch: 1 branch
BranchTrueFalseTotal
@$mtom or return &$simple_create($request, $content) 1 0 1
257  
258 1 my $bound = "MIME-boundary-".int rand 10000;
259 1 (my $start_cid = $mtom->[0]->cid) =~ s/^.*\@/xml@/;
260  
261 1 my $si = "$content_type";
262 1 $si =~ s/\"/\\"/g;
263 1 $request->header(Content_Type => <<__CT);
264 multipart/related;
265 boundary="$bound";
266 type="$mime_xop";
267 start="<$start_cid>";
268 start-info="$si"
269 __CT
270  
271 1 my $base = HTTP::Message->new
272 ( [ Content_Type => qq{$mime_xop; charset="$charset"; type="$si"}
273 , Content_Transfer_Encoding => '8bit'
274 , Content_ID => "<$start_cid>"
275 ] );
276 1 $base->content_ref($content); # already bytes (not utf-8)
277  
278 1 my @parts = ($base, map $_->mimePart, @$mtom);
279 1 $request->parts(@parts); #$base, map $_->mimePart, @$mtom);
280 1 $request;
281 1 };
282  
283 my $parse = sub
284 1 ▶ { my ($response, $mtom) = @_;
Subroutine __ANON__: called CC=9 SCAR=23.8
285 1 ▶ my $ct = $response->header('Content-Type') || '';
Condition50%1/2
$response->header('Content-Type') || ''
l!l
10
MC/DC0%0/1
$response->header('Content-Type') || ''
$response->header('Content-Type')
Truth table50%1/2
A
A= $response->header('Content-Type')
Aresult
11
00
286 1 ▶ $ct =~ m!^\s*multipart/related\s*\;!i
Branch: 1 branch
BranchTrueFalseTotal
$ct =~ m[^\s*multipart/related\s*\;]i or return &$simple_parse($response) 1 0 1
287 or return $simple_parse->($response);
288  
289 1 my (@parts, %parts);
290 1 foreach my $part ($response->parts)
291 2 ▶ { my $include = XML::Compile::XOP::Include->fromMime($part)
Branch: 1 branch
BranchTrueFalseTotal
my $include = "XML::Compile::XOP::Include"->fromMime($part) or next 2 0 2
292 or next;
293 2 $parts{$include->cid} = $include;
294 2 push @parts, $include;
295 }
296  
297 @parts
298 1 ▶ or error "no parts in response multi-part for XOP";
Branch: 1 branch
BranchTrueFalseTotal
@parts or &error("no parts in response multi-part for XOP") 1 0 1
299  
300 1 my $root;
301 1 ▶ if($ct =~ m!start\=(["']?)\<([^"']*)\>\1!)
Branch: 1 branch
BranchTrueFalseTotal
if ($ct =~ /start\=(["']?)\<([^"']*)\>\1/) 1 0 1
302 1 { my $startid = $2;
303 1 $root = delete $parts{$startid};
304 1 ▶ defined $root
Branch: 1 branch
BranchTrueFalseTotal
defined $root or &warning(&__x("cannot find root node id in parts `{id}'", "id", $startid)) 1 0 1
305 or warning __x"cannot find root node id in parts `{id}'"
306 , id => $startid;
307 }
308 1 ▶ unless($root)
Branch: 1 branch
BranchTrueFalseTotal
unless ($root) 0 1 1
309 0 { $root = shift @parts;
310 0 delete $parts{$root->cid};
311 }
312  
313 1 ($root->content(1), \%parts);
314 1 };
315  
316 1 ($create, $parse);
317 }
318  
319 sub _prepare_for_no_answer($)
320 0 ▶{ my $self = shift;
Subroutine _prepare_for_no_answer: not called CC=1 SCAR=6.9
321 sub
322 0 ▶ { my $response = shift;
Subroutine __ANON__: not called CC=4 SCAR=30.0
323 0 ▶ my $ct = $response->content_type || '';
Condition0%0/2
$response->content_type || ''
l!l
00
MC/DC0%0/1
$response->content_type || ''
$response->content_type
Truth table0%0/2
A
A= $response->content_type
Aresult
11
00
324  
325 0 trace "received ".$response->status_line;
326  
327 0 my $content = '';
328 0 ▶ if($ct =~ m,[/+]xml$,i)
Branch: 1 branch
BranchTrueFalseTotal
if ($ct =~ m[[/+]xml$]i) 0 0 0
329 { # HTTP::Message::decoded_content() does not work for old Perls
330 0 ▶ $content = $] >= 5.008 ? $response->decoded_content(ref => 1)
Branch: 1 branch
BranchTrueFalseTotal
$] >= 5.008 ? : 0 0 0
331 : $response->content(ref => 1);
332 }
333  
334 0 ($content, {});
335 0 };
336 }
337  
338  
339 sub headerAddVersions($)
340 2 ▶{ my ($thing, $h) = @_;
Subroutine headerAddVersions: called CC=3 SCAR=11.0
Pod documented
341 2 foreach my $pkg (qw/XML::Compile XML::Compile::Cache
342 XML::Compile::SOAP XML::LibXML LWP/)
343 3 ▶ { no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
344 10 ▶ my $version = ${"${pkg}::VERSION"} || 'undef';
Condition50%1/2
${"${pkg}::VERSION";} || 'undef'
l!l
100
MC/DC0%0/1
${"${pkg}::VERSION";} || 'undef'
${"${pkg}::VERSION";}
Truth table50%1/2
A
A= ${"${pkg}::VERSION";}
Aresult
11
00
345 10 (my $field = "X-$pkg-Version") =~ s/\:\:/-/g;
346 10 $h->header($field => $version);
347 }
348 }
349  
350 3 1;
« lib/XML/Compile/SOAP/Trace.pm ↑ Summary lib/XML/Compile/SOAP/Client.pm »