Branch Coverage

blib/lib/JSON/Server.pm
Criterion Covered Total %
branch 34 64 53.1


line true false branch
22 11 9 if (exists $o->{$nm})
40 0 5 unless ($gs->{'port'})
62 13 0 if (defined eval { do { 15 } })
77 0 5 if ($gs->{'verbose'})
81 0 5 unless ($server)
88 0 14 if ($gs->{'verbose'})
92 5 9 if ($fh == $server)
99 0 9 if ($gs->{'verbose'})
107 0 9 unless (defined $recv_ret)
108 0 0 if ($gs->{'verbose'})
114 6 3 if ($got =~ s/\x{00}$//)
120 0 9 unless ($ok)
124 0 9 if ($gs->{'verbose'})
127 3 6 if (length $got == 0)
128 0 3 if ($gs->{'verbose'})
133 0 6 unless (valid_json($got))
134 0 0 if ($gs->{'verbose'})
140 0 6 if ($gs->{'verbose'})
144 5 1 if (ref $input eq 'HASH')
146 2 3 if (defined $control)
147 2 0 if ($control eq 'stop')
148 0 2 if ($gs->{'verbose'})
152 0 2 if ($gs->{'verbose'})
158 0 0 if ($control eq 'close')
160 0 0 if ($gs->{'verbose'})
178 0 4 unless ($gs->{'handler'})
186 0 4 unless ($ok)
191 0 4 if ($gs->{'verbose'})
201 0 6 if ($gs->{'verbose'})
206 0 6 unless (defined $sent)
209 0 6 if ($gs->{'verbose'})
217 0 2 if ($gs->{'verbose'})