| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Syndic8::RPCXML; |
|
2
|
1
|
|
|
1
|
|
36
|
use 5.008002; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
53
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
30
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
91
|
|
|
5
|
|
|
|
|
|
|
require RPC::XML; |
|
6
|
|
|
|
|
|
|
require RPC::XML::Client; |
|
7
|
1
|
|
|
1
|
|
664
|
use Net::Syndic8::Base; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
453
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Net::Syndic8::Base); |
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
10
|
|
|
|
|
|
|
# Preloaded methods go here. |
|
11
|
|
|
|
|
|
|
attributes (qw/EndPoint Function Params/); |
|
12
|
|
|
|
|
|
|
sub _init { |
|
13
|
0
|
|
|
0
|
|
|
my $self=shift; |
|
14
|
0
|
|
|
|
|
|
$self->Init(@_); |
|
15
|
0
|
|
|
|
|
|
return 1 |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub Init { |
|
19
|
0
|
|
|
0
|
|
|
my ($self,$endpoint,$function)=@_; |
|
20
|
0
|
|
|
|
|
|
EndPoint $self $endpoint; |
|
21
|
0
|
|
|
|
|
|
Function $self $function; |
|
22
|
0
|
|
|
|
|
|
Params $self ([]) |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub NewReq { |
|
26
|
0
|
|
|
0
|
|
|
my ($self,$function)=@_; |
|
27
|
0
|
|
|
|
|
|
return new Net::Syndic8::RPCXML:: ($self->EndPoint,$function); |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub string { |
|
31
|
0
|
|
|
0
|
|
|
my $self=shift; |
|
32
|
0
|
|
|
|
|
|
my $params=$self->Params; |
|
33
|
0
|
|
|
|
|
|
push @{$params},RPC::XML::string->new(shift); |
|
|
0
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $self |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub array { |
|
38
|
0
|
|
|
0
|
|
|
my $self=shift; |
|
39
|
0
|
|
|
|
|
|
my $params=$self->Params; |
|
40
|
0
|
|
|
|
|
|
push @{$params},RPC::XML::array->new(@_); |
|
|
0
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $self |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub value { |
|
45
|
0
|
|
|
0
|
|
|
my $self=shift; |
|
46
|
0
|
|
|
|
|
|
my $req = RPC::XML::request->new($self->Function(),@{$self->Params}); |
|
|
0
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $cli = RPC::XML::Client->new($self->EndPoint()); |
|
48
|
0
|
|
|
|
|
|
my $resp = $cli->send_request($req); |
|
49
|
0
|
|
|
|
|
|
return $resp->value; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
__END__ |