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