Branch Coverage

blib/lib/JSON/RPC2/AnyEvent/Server.pm
Criterion Covered Total %
branch 26 38 68.4


line true false branch
22 5 3 if ((&reftype($spec) // '') eq 'CODE') { }
38 0 9 unless ($method)
42 9 0 if ($type eq 'c') { }
57 2 0 &reftype($json) eq 'HASH' ? :
69 0 11 unless &reftype($json) eq 'HASH'
71 1 10 unless exists $json->{'method'} and not ref $json->{'method'}
72 9 1 if (exists $json->{'params'}) { }
73 1 8 unless (&reftype($json->{'params'}) // '') eq 'ARRAY' or (&reftype($json->{'params'}) // '') eq 'HASH'
77 0 9 unless exists $json->{'id'}
78 0 9 if ref $json->{'id'}
94 2 0 defined $data ? :
108 5 3 if (UNIVERSAL::isa($spec, 'CODE')) { }
113 0 3 unless UNIVERSAL::isa($code, 'CODE')
124 1 2 if ($spec =~ s/^\s*\[\s*//) { }
2 0 elsif ($spec =~ s/\s*\{\s*//) { }
125 0 1 unless $spec =~ s/\s*\]\s*$//
129 1 0 if UNIVERSAL::isa($params, 'ARRAY')
136 0 2 unless $spec =~ s/\s*\}\s*$//
140 1 2 if UNIVERSAL::isa($params, 'HASH')