Branch Coverage

blib/lib/JSON/RPC2/TwoWay.pm
Criterion Covered Total %
branch 34 56 60.7


line true false branch
57 0 7 unless $self
58 0 7 unless $name
59 1 6 unless ref $cb eq 'CODE'
62 1 1 if $opts{'non_blocking'} and $opts{'notification'}
63 1 4 if $self->{'methods'}{$name}
77 0 0 unless $self
78 0 0 unless $name
80 0 0 unless $method
86 0 9 if $self->{'debug'}
90 1 8 unless $m
91 1 2 unless $id or $m->{'notification'}
94 1 6 if ref $r->{'params'} ne 'ARRAY' and ref $r->{'params'} ne 'HASH'
97 1 1 $m->{'by_name'} ? :
3 3 $m->{'by_name'} ? :
2 4 if ref $r->{'params'} ne ($m->{'by_name'} ? 'HASH' : 'ARRAY')
100 1 3 if $m->{'state'} and not $c->state && $m->{'state'} eq $c->state
102 0 3 if ($m->{'raw'})
104 0 0 if $id
0 0 if $m->{'non_blocking'}
109 0 0 if $@
112 0 0 if not $cb and $id
117 1 0 if $id
1 2 if $m->{'non_blocking'}
121 0 3 if $@
124 2 1 if not $cb and $id
131 0 11 if $self->{'debug'}
133 0 11 defined $data ? :
146 2 1 if scalar @$result == 1