Branch Coverage

blib/lib/Net/WebSocket/Server.pm
Criterion Covered Total %
branch 24 56 42.8


line true false branch
36 0 4 unless exists $$self{$key}
37 0 4 if ref $$self{$key} and ref $value ne ref $$self{$key}
49 0 2 unless @{$$self{$key};} % 2 == 0
60 0 0 unless @_ % 2 == 0
66 0 0 if @_
72 0 0 unless @_ % 2 == 0
78 0 0 if @_
85 0 2 unless @_ % 2 == 0
88 0 2 unless ref $cb eq 'CODE'
89 0 2 if ($$self{"watch_$watchtype"}{$fh})
122 0 0 unless exists $$self{"on_$key"}
123 0 0 unless ref $value eq 'CODE'
131 1 0 if (ref $$self{'listen'}) { }
134 0 1 if $$self{'listen'}->error
149 1 0 $$self{'silence_max'} ? :
150 0 1 $$self{'tick_period'} ? :
153 22 0 $$self{'silence_max'} ? :
154 0 22 $$self{'tick_period'} ? :
158 22 0 $ready_read ? :
159 1 20 if ($fh == $$self{'listen'}) { }
1 19 elsif ($$self{'watch_readable'}{$fh}) { }
19 0 elsif ($$self{'conns'}{$fh}) { }
161 0 1 unless $sock
178 22 0 $ready_write ? :
179 1 0 if ($$self{'watch_writable'}{$fh}) { }
187 22 0 if ($$self{'silence_max'})
189 0 22 if ($silence_nextcheck < $now)
197 0 22 if ($$self{'tick_period'} and $tick_next < time)