lib/SOAP/Transport/LOCAL.pm

filter: Statementstmt 100% 32 / 32 Branchbran 100% 10 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 47 / 47 CC 6 SCAR 13.9
CC
6
Cov
100%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.0
« lib/SOAP/Transport/IO.pm ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchema1999.pm »
1 # ======================================================================
2 #
3 # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com)
4 # SOAP::Lite is free software; you can redistribute it
5 # and/or modify it under the same terms as Perl itself.
6 #
7 # ======================================================================
8  
9 package SOAP::Transport::LOCAL;
10  
11 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 2 our $VERSION = 1.17;
15  
16 # ======================================================================
17  
18 package SOAP::Transport::LOCAL::Client;
19  
20 2 ▶use SOAP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 our @ISA = qw(SOAP::Client SOAP::Server);
24  
25 sub new {
26 38 ▶ my $class = shift;
Subroutine new: called CC=6 SCAR=17.9
27 38 ▶ return $class if ref $class;
Branch: 1 branch
BranchTrueFalseTotal
if ref $class 35 3 38
28 3 my @method_from;
29 3 ▶ while (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 4 3 7
30 4 ▶ if ($class->can($_[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if ($class->can($_[0])) { } 3 1 4
31 3 push(@method_from, shift() => shift);
32 }
33 else
34 {
35 # ignore unknown arguments
36 1 shift;
37 }
38 }
39 3 my $self = $class->SUPER::new();
40 3 $self->is_success(1); # it's difficult to fail in this module
41 3 $self->dispatch_to(@INC);
42 3 ▶ while (@method_from) {
Branch: 1 branch
BranchTrueFalseTotal
if (@method_from) 3 3 6
43 3 my($method, $param_ref) = splice(@method_from,0,2);
44 3 ▶ $self->$method(ref $param_ref eq 'ARRAY'
Branch: 1 branch
BranchTrueFalseTotal
ref $param_ref eq 'ARRAY' ? : 1 2 3
45 ? @$param_ref
46 : $param_ref)
47 }
48 3 return $self;
49 }
50  
51 sub send_receive {
52 1 ▶ my ($self, %parameters) = @_;
Subroutine send_receive: called CC=1 SCAR=0.0
53 my ($envelope, $endpoint, $action) =
54 1 @parameters{qw(envelope endpoint action)};
55  
56 1 SOAP::Trace::debug($envelope);
57 1 my $response = $self->SUPER::handle($envelope);
58 1 SOAP::Trace::debug($response);
59  
60 1 return $response;
61 }
62  
63 # ======================================================================
64  
65 2 1;
66  
67 __END__
« lib/SOAP/Transport/IO.pm ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchema1999.pm »