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::IO; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
2540
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
101
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = 1.11; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
1078
|
use IO::File; |
|
1
|
|
|
|
|
3159
|
|
|
1
|
|
|
|
|
139
|
|
16
|
1
|
|
|
1
|
|
7
|
use SOAP::Lite; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
17
|
|
|
|
|
|
|
# ====================================================================== |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
package SOAP::Transport::IO::Server; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
22
|
1
|
|
|
1
|
|
5
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
23
|
1
|
|
|
1
|
|
3
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
332
|
|
24
|
|
|
|
|
|
|
@ISA = qw(SOAP::Server); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
0
|
|
|
0
|
|
|
my $class = shift; |
28
|
|
|
|
|
|
|
|
29
|
0
|
0
|
|
|
|
|
return $class if ref $class; |
30
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $self; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub in { |
36
|
0
|
|
|
0
|
|
|
my $self = shift; |
37
|
0
|
0
|
|
|
|
|
$self = $self->new() if not ref $self; |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
return $self->{ _in } if not @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
my $file = shift; |
42
|
0
|
0
|
0
|
|
|
|
$self->{_in} = (defined $file && !ref $file && !defined fileno($file)) |
43
|
|
|
|
|
|
|
? IO::File->new($file, 'r') |
44
|
|
|
|
|
|
|
: $file; |
45
|
0
|
|
|
|
|
|
return $self; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub out { |
49
|
0
|
|
|
0
|
|
|
my $self = shift; |
50
|
0
|
0
|
|
|
|
|
$self = $self->new() if not ref $self; |
51
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
|
return $self->{ _out } if not @_; |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
my $file = shift; |
55
|
0
|
0
|
0
|
|
|
|
$self->{_out} = (defined $file && !ref $file && !defined fileno($file)) |
56
|
|
|
|
|
|
|
? IO::File->new($file, 'w') |
57
|
|
|
|
|
|
|
: $file; |
58
|
0
|
|
|
|
|
|
return $self; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub handle { |
62
|
0
|
|
|
0
|
|
|
my $self = shift->new; |
63
|
|
|
|
|
|
|
|
64
|
0
|
0
|
|
|
|
|
$self->in(*STDIN)->out(*STDOUT) unless defined $self->in; |
65
|
0
|
|
|
|
|
|
my $in = $self->in; |
66
|
0
|
|
|
|
|
|
my $out = $self->out; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $result = $self->SUPER::handle(join '', <$in>); |
69
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
70
|
0
|
0
|
|
|
|
|
print {$out} $result |
|
0
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
if defined $out; |
72
|
0
|
|
|
|
|
|
return; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# ====================================================================== |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
__END__ |