Condition Coverage

blib/lib/PAGI/WebSocket.pm
Criterion Covered Total %
condition 65 79 82.2


and 3 conditions

line !l l&&!r l&&r condition
17 1 1 154 $scope and ref $scope eq "HASH"
19 1 1 152 $receive and ref $receive eq "CODE"
21 1 1 150 $send and ref $send eq "CODE"
226 0 1 1 $t and $t->can("on_high_water")
233 0 1 1 $t and $t->can("on_drain")
281 4 1 10 builtin::blessed($r) and $r->isa("Future")
335 6 0 2 builtin::blessed($r) and $r->isa("Future")
680 4 0 1 builtin::blessed($r) and $r->isa("Future")

or 2 conditions

line l !l condition
24 150 0 $scope->{'type'} // ""
54 18 1 +(shift())->{'scope'}{'query_string'} // ""
55 1 1 +(shift())->{'scope'}{'scheme'} // "ws"
56 2 1 +(shift())->{'scope'}{'http_version'} // "1.1"
57 2 1 +(shift())->{'scope'}{'subprotocols'} // []
65 4 2 $self->{'scope'}{'state'} // {}
72 1 1 $self->{'scope'}{'path_params'} // {}
77 5 1 $self->{'scope'}{'path_params'} // {}
103 1 31 delete $opts{'strict'} // 0
104 6 26 delete $opts{'raw'} // 0
116 29 0 $key //= ""
117 28 1 $val //= ""
157 4 0 $self->{'scope'}{'headers'} // []
171 2 0 $self->{'scope'}{'headers'} // []
255 49 1 $code // 1005
256 49 1 $reason // ""
373 3 13 $code //= 1000
374 3 13 $reason //= ""
402 2 0 $opts{'status'} // 403
403 1 1 $opts{'headers'} // []
560 19 8 $event->{'code'} // 1005
561 4 23 $event->{'reason'} // ""
698 6 0 $interval //= 0

or 3 conditions

line l !l&&r !l&&!r condition
53 1 0 1 $s->{'scope'}{'raw_path'} // $s->{'scope'}{'path'}
558 0 27 71 not defined $event or $event->{'type'} eq "websocket.disconnect"
674 7 0 0 $event->{'text'} // $event->{'bytes'}