| line |
true |
false |
branch |
|
27
|
0 |
2 |
unless $opt{'rpc'} and $opt{'rpc'}->isa("JSON::RPC2::TwoWay") |
|
29
|
1 |
1 |
unless $opt{'write'} and ref $opt{'write'} eq "CODE" |
|
41
|
0 |
1 |
$opt{'debug'} ? : |
|
|
0 |
1 |
ref $opt{'debug'} eq 'CODE' ? : |
|
48
|
0 |
5 |
unless $self |
|
49
|
1 |
4 |
unless ref $args eq "ARRAY" or ref $args eq "HASH" |
|
51
|
1 |
3 |
unless $cb |
|
52
|
1 |
2 |
if ref $cb ne "CODE" |
|
54
|
0 |
2 |
if $self->{'calls'}{$id} |
|
69
|
0 |
0 |
unless $self |
|
70
|
0 |
0 |
unless ref $request eq "HASH" |
|
72
|
0 |
0 |
if ref $cb ne "CODE" |
|
74
|
0 |
0 |
if $self->{'calls'}{$id} |
|
86
|
0 |
0 |
unless $self |
|
87
|
0 |
0 |
unless ref $args eq "ARRAY" or ref $args eq "HASH" |
|
102
|
5 |
12 |
if $err[0] |
|
108
|
0 |
17 |
if $self->{'debug'} |
|
111
|
1 |
16 |
if $@ |
|
112
|
1 |
15 |
if ref $r ne "HASH" |
|
113
|
1 |
14 |
unless defined $r->{'jsonrpc'} and $r->{'jsonrpc'} eq "2.0" |
|
115
|
1 |
13 |
if exists $r->{'id'} and ref $r->{'id'} |
|
116
|
9 |
4 |
if (defined $r->{'method'}) { } |
|
|
3 |
1 |
elsif (exists $r->{'id'} and exists $r->{'result'} || defined $r->{'error'}) { } |
|
130
|
3 |
0 |
if $id |
|
131
|
1 |
2 |
unless $cb |
|
133
|
1 |
1 |
if (defined $r->{'error'}) { } |
|
135
|
0 |
1 |
unless ref $e eq "HASH" |
|
136
|
0 |
1 |
unless defined $e->{'code'} and $e->{'code'} =~ /^-?\d+$/ |
|
137
|
0 |
1 |
if ref $e->{'message'} |
|
138
|
0 |
1 |
if keys %$e == 3 and not exists $e->{'data'} or keys %$e > 2 |
|
139
|
0 |
1 |
if ($raw) { } |
|
145
|
0 |
1 |
if ($raw) { } |
|
156
|
0 |
16 |
if $self->{'debug'} |
|
162
|
0 |
0 |
if @_ |
|
168
|
1 |
3 |
if @_ |