Branch Coverage

blib/lib/AnyEvent/WebSocket/Connection.pm
Criterion Covered Total %
branch 36 40 90.0


line true false branch
94 0 35 if $self->_is_finished
104 3 32 if defined $message
124 1 104 unless $self->_is_read_open
129 61 43 if ($are_callbacks_supposed_to_be_ready) { }
140 4 232 if (not $success)
167 23 34 if (defined $self)
178 0 23 if (not $success)
189 1 103 unless $self->_is_read_open
191 77 26 if ($received_message->is_text or $received_message->is_binary) { }
25 1 elsif ($received_message->is_close) { }
1 0 elsif ($received_message->is_ping) { }
211 19 6 if ($body)
240 19 112 unless $self->_is_write_open
242 47 65 if (ref $message) { }
272 32 53 if ($event eq 'next_message') { }
16 37 elsif ($event eq 'each_message') { }
35 2 elsif ($event eq 'finish') { }
2 0 elsif ($event eq 'parse_error') { }
301 5 35 $code ? :
303 4 36 if defined $reason