line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::RPC::Spec::Client; |
2
|
7
|
|
|
7
|
|
25
|
use Moo; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
31
|
|
3
|
7
|
|
|
7
|
|
1372
|
use Carp (); |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
182
|
|
4
|
|
|
|
|
|
|
with qw( |
5
|
|
|
|
|
|
|
JSON::RPC::Spec::Common |
6
|
|
|
|
|
|
|
); |
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
25
|
use namespace::clean; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
38
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub compose { |
12
|
3
|
|
|
3
|
1
|
5134
|
my ($self, $method, $params, $id) = @_; |
13
|
3
|
|
|
|
|
4
|
my @args; |
14
|
3
|
100
|
|
|
|
9
|
if (defined $id) { |
15
|
1
|
|
|
|
|
2
|
@args = (id => $id); |
16
|
|
|
|
|
|
|
} |
17
|
3
|
|
|
|
|
8
|
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__ |