line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::RPC::Spec::Client; |
2
|
7
|
|
|
7
|
|
39
|
use Moo; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
41
|
|
3
|
7
|
|
|
7
|
|
2055
|
use Carp (); |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
236
|
|
4
|
|
|
|
|
|
|
with qw( |
5
|
|
|
|
|
|
|
JSON::RPC::Spec::Common |
6
|
|
|
|
|
|
|
); |
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
37
|
use namespace::clean; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
57
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub compose { |
12
|
3
|
|
|
3
|
1
|
5202
|
my ($self, $method, $params, $id) = @_; |
13
|
3
|
|
|
|
|
8
|
my @args; |
14
|
3
|
100
|
|
|
|
11
|
if (defined $id) { |
15
|
1
|
|
|
|
|
3
|
@args = (id => $id); |
16
|
|
|
|
|
|
|
} |
17
|
3
|
|
|
|
|
12
|
return $self->coder->encode( |
18
|
|
|
|
|
|
|
+{ |
19
|
|
|
|
|
|
|
jsonrpc => $self->_jsonrpc, |
20
|
|
|
|
|
|
|
method => $method, |
21
|
|
|
|
|
|
|
params => $params, |
22
|
|
|
|
|
|
|
@args |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
__END__ |