Branch Coverage

blib/lib/JSON/RPC2/TwoWay.pm
Criterion Covered Total %
branch 37 62 59.6


line true false branch
31 0 1 $opt{'debug'} ? :
0 1 ref $opt{'debug'} eq 'CODE' ? :
45 0 2 $self->{'debug'} ? :
58 0 7 unless $self
59 0 7 unless $name
60 1 6 unless ref $cb eq "CODE"
63 1 1 if $opts{'non_blocking'} and $opts{'notification'}
64 1 4 if $self->{'methods'}{$name}
78 0 0 unless $self
79 0 0 unless $name
81 0 0 unless $method
87 0 9 if $self->{'debug'}
91 1 8 unless $m
92 1 2 unless $id or $m->{'notification'}
95 1 6 if ref $r->{'params'} ne "ARRAY" and ref $r->{'params'} ne "HASH"
98 1 1 $m->{'by_name'} ? :
3 3 $m->{'by_name'} ? :
2 4 if ref $r->{'params'} ne ($m->{'by_name'} ? "HASH" : "ARRAY")
101 1 3 if $m->{'state'} and not $c->state && $m->{'state'} eq $c->state
103 0 3 if ($m->{'raw'})
105 0 0 if $id
0 0 if $m->{'non_blocking'}
110 0 0 if $@
113 0 0 if not $cb and $id
118 1 0 if $id
1 2 if $m->{'non_blocking'}
122 0 3 if $@
125 2 1 if not $cb and $id
132 0 11 if $self->{'debug'}
134 0 11 defined $data ? :
147 2 1 if scalar @$result == 1