blib/lib/JSON/RPC/Spec/Client.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 23 / 23 CC 2 SCAR 3.4
CC
2
Cov
100%
compose
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« blib/lib/JSON/RPC/Spec.pm ↑ Summary blib/lib/JSON/RPC/Spec/Common.pm »
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
BranchTrueFalseTotal
if (defined $id) 1 2 3
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__
« blib/lib/JSON/RPC/Spec.pm ↑ Summary blib/lib/JSON/RPC/Spec/Common.pm »