line |
true |
false |
branch |
13
|
3 |
34 |
unless ($rpc_response) |
22
|
10 |
24 |
ref $rpc_response eq 'HASH' && exists $rpc_response->{'error'} ? : |
37
|
35 |
2 |
if ($method eq 'POST') { } |
|
2 |
0 |
elsif ($method eq 'GET') { } |
38
|
0 |
35 |
if ($log->is_level('debug')) |
43
|
2 |
33 |
unless eval {
do {
$request = decode_json($req->body);
1
}
} |
44
|
2 |
33 |
if ($decode_error) |
54
|
0 |
2 |
if (exists $params->{'params'}) |
56
|
0 |
0 |
unless eval {
do {
$decoded_params = decode_json($params->{'params'});
1
}
} |
58
|
0 |
0 |
if ($decode_error) |
65
|
0 |
2 |
exists $params->{'id'} ? : |
|
0 |
2 |
defined $decoded_params ? : |
74
|
0 |
35 |
if (ref $request ne 'HASH' and ref $request ne 'ARRAY') |
81
|
27 |
8 |
ref $request eq 'HASH' ? : |
82
|
4 |
38 |
if (ref $obj ne 'HASH') |
87
|
37 |
1 |
if exists $obj->{'method'} |
88
|
4 |
34 |
unless (defined $method and $method =~ /^[A-Za-z_\.][A-Za-z0-9_\.]*$/msx) |
98
|
27 |
7 |
if exists $obj->{'params'} |
99
|
1 |
26 |
if (defined $params and ref $params ne 'ARRAY' and ref $params ne 'HASH') |
110
|
0 |
5 |
if (not exists $obj->{'id'} && defined $obj->{'id'} and exists $obj->{'version'} and defined $obj->{'version'} and $obj->{'version'} eq '1.1') |
122
|
28 |
5 |
exists $obj->{'id'} ? : |
123
|
5 |
28 |
unless (exists $obj->{'id'} and defined $obj->{'id'}) |
126
|
26 |
7 |
if (defined $params) |
127
|
0 |
26 |
if (ref $params ne 'ARRAY' and ref $params ne 'HASH') { } |
144
|
2 |
35 |
if (ref $methods eq 'MojoX::JSON::RPC::Dispatcher::Method') |
145
|
2 |
0 |
if ($methods->has_error) |
150
|
1 |
34 |
if (scalar @{$methods;} == 0) |
160
|
34 |
0 |
ref $methods eq 'ARRAY' ? : |
161
|
9 |
33 |
if ($m->has_error) |
166
|
31 |
2 |
if exists $$rpcs{$m->method} |
168
|
31 |
0 |
if defined $rpc and exists $rpc->{'method'} |
169
|
31 |
2 |
if (defined $code_ref) { } |
184
|
14 |
17 |
exists $rpc->{'with_svc_obj'} && $rpc->{'with_svc_obj'} ? : |
|
3 |
28 |
exists $rpc->{'with_mojo_tx'} && $rpc->{'with_mojo_tx'} ? : |
|
3 |
28 |
exists $rpc->{'with_self'} && $rpc->{'with_self'} ? : |
|
22 |
3 |
ref $m->params eq 'ARRAY' ? : |
|
25 |
6 |
defined $m->params ? : |
190
|
1 |
30 |
if ($@) |
193
|
1 |
0 |
if (ref $handler eq 'CODE') { } |
204
|
28 |
5 |
if (not $m->is_notification or $m->has_error) |
208
|
2 |
32 |
scalar @responses > 1 ? : |
222
|
34 |
0 |
exists $trans{$code} ? : |