File Coverage

blib/lib/SOAP/Transport/LOCAL.pm
Criterion Covered Total %
statement 9 29 31.0
branch 0 6 0.0
condition n/a
subroutine 3 5 60.0
pod n/a
total 12 40 30.0


line stmt bran cond sub pod time code
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 1     1   877 use strict;
  1         2  
  1         50  
12              
13              
14             our $VERSION = 1.12;
15              
16             # ======================================================================
17              
18             package SOAP::Transport::LOCAL::Client;
19              
20 1     1   4 use SOAP::Lite;
  1         1  
  1         4  
21              
22 1     1   3 use vars qw(@ISA);
  1         2  
  1         222  
23             our @ISA = qw(SOAP::Client SOAP::Server);
24              
25             sub new {
26 0     0     my $class = shift;
27 0 0         return $class if ref $class;
28 0           my @method_from;
29 0           while (@_) {
30 0 0         if ($class->can($_[0])) {
31 0           push(@method_from, shift() => shift);
32             }
33             else
34             {
35             # ignore unknown arguments
36 0           shift;
37             }
38             }
39 0           my $self = $class->SUPER::new();
40 0           $self->is_success(1); # it's difficult to fail in this module
41 0           $self->dispatch_to(@INC);
42 0           while (@method_from) {
43 0           my($method, $param_ref) = splice(@method_from,0,2);
44 0 0         $self->$method(ref $param_ref eq 'ARRAY'
45             ? @$param_ref
46             : $param_ref)
47             }
48 0           return $self;
49             }
50              
51             sub send_receive {
52 0     0     my ($self, %parameters) = @_;
53 0           my ($envelope, $endpoint, $action) =
54             @parameters{qw(envelope endpoint action)};
55              
56 0           SOAP::Trace::debug($envelope);
57 0           my $response = $self->SUPER::handle($envelope);
58 0           SOAP::Trace::debug($response);
59              
60 0           return $response;
61             }
62              
63             # ======================================================================
64              
65             1;
66              
67             __END__