| 1 | package JSON::RPC::Spec::Client; | ||||||||||
| 2 | 7 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 7 | ▶ | use Carp (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | with qw( | |||||||||
| 5 | JSON::RPC::Spec::Common | ||||||||||
| 6 | ); | ||||||||||
| 7 | |||||||||||
| 8 | 7 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | sub compose { | ||||||||||
| 12 | 3 | ▶ | my ($self, $method, $params, $id) = @_; | ||||||||
|
Subroutine
compose: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 13 | 3 | my @args; | |||||||||
| 14 | 3 | ▶ | if (defined $id) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 1 | @args = (id => $id); | |||||||||
| 16 | } | ||||||||||
| 17 | 3 | return $self->coder->encode( | |||||||||
| 18 | +{ | ||||||||||
| 19 | jsonrpc => $self->_jsonrpc, | ||||||||||
| 20 | method => $method, | ||||||||||
| 21 | params => $params, | ||||||||||
| 22 | @args | ||||||||||
| 23 | } | ||||||||||
| 24 | ); | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 7 | 1; | |||||||||
| 28 | __END__ | ||||||||||