Branch Coverage

blib/lib/Centrifugo/Client.pm
Criterion Covered Total %
branch 18 80 22.5


line true false branch
94 0 1 if %params
116 0 1 unless $PARAMS{'user'}
117 0 1 unless $PARAMS{'timestamp'}
118 0 1 unless $PARAMS{'token'}
120 1 0 if $PARAMS{'timestamp'}
136 0 1 if ($@)
157 0 0 if $this->{'ON'}{'error'}
173 1 0 if ($body and ref $body eq 'HASH' and $body->{'client'})
177 0 1 if $this->{'MAX_ALIVE'}
179 1 0 if $this->{'RESUBSCRIBE'}
196 0 0 if ($body->{'recovered'} == JSON::true())
202 0 0 if $sub
233 0 0 if ($this->{'RECOVER'} and $this->{'_channels'}{$channel}{'last'})
244 0 0 unless $message
246 0 0 if $this->{'ON'}{'ws_closed'}
259 0 0 if $this->{'ON'}{'error'}
269 1 0 if (ref $fullbody eq 'HASH')
277 1 0 if $method eq 'connect'
278 0 1 if $method eq 'subscribe'
279 0 1 if $method eq 'unsubscribe'
280 0 1 if $method eq 'message'
284 1 0 if ($sub)
286 1 0 if ($uid)
306 0 0 $this->{'_next_retry'} > $this->{'MAX_RETRY'} ? :
307 0 0 if $retry_after > 3
327 0 0 if ($late > $this->{'MAX_ALIVE'})
356 0 0 unless $PARAMS{'channel'}
357 0 0 unless $PARAMS{'data'}
377 0 0 if $this->{'WSHANDLE'}
379 0 0 if $sub
399 0 0 if $this->{'_subscribed_channels'}{$channel}
400 0 0 if $this->{'_pending_subscriptions'}{$channel}
403 0 0 unless ($this->client_id)
406 0 0 if $this->{'ON'}{'error'}
416 0 0 if $PARAMS{'uid'}
419 0 0 unless $channel =~ /^\$/
436 0 0 unless ($headers->{'Status'} == 200)
439 0 0 if $this->{'ON'}{'error'}
602 0 3 if $this->{'DEBUG'}
608 0 2 if $this->{'DEBUG_WS'}