Branch Coverage

blib/lib/Async/Redis/Subscription.pm
Criterion Covered Total %
branch 13 176 7.3


line true false branch
43 1 2 if @_ > 1
52 0 0 if (@_ > 1)
53 0 0 if (not $cb and $self->{'_on_message'})
62 0 0 if $cb
72 0 0 if (@_ > 1)
92 0 0 unless ($ok)
106 0 0 if (my $cb = $self->{'_on_error'})
109 0 0 unless ($ok)
178 0 0 if $self->{'_fatal_error'}
179 0 0 if $self->{'_closed'}
180 0 0 if $exit_on_pause and $self->{'_paused'}
186 0 0 if $self->{'_fatal_error'}
187 0 0 if $self->{'_closed'} and not @{$self->{'_pending_messages'};}
189 0 0 if $exit_on_pause and $self->{'_paused'} and not @{$self->{'_pending_messages'};}
192 0 0 if (my $w = delete $self->{'_slot_waiter'})
193 0 0 unless $w->is_ready
205 0 0 if ($self->{'_on_message'})
233 2 0 unless ($ok)
235 1 1 if ($redis->{'reconnect'} and $self->channel_count > 0)
241 1 0 unless $reconnect_ok
242 1 0 unless ($reconnect_ok)
246 0 0 if ($self->{'_on_reconnect'})
269 0 0 unless $frame and ref $frame eq "ARRAY"
274 0 0 if ($type eq 'message') { }
0 0 elsif ($type eq 'pmessage') { }
0 0 elsif ($type eq 'smessage') { }
306 0 0 if $self->{'_closed'}
311 0 0 $redis && $redis->{'message_queue_depth'} ? :
313 0 0 if ($depth and scalar @{$self->{'_pending_messages'};} >= $depth)
320 0 0 if not $weak or $weak->{'_closed'}
322 0 0 if (my $w = delete $weak->{'_message_waiter'})
323 0 0 unless $w->is_ready
330 0 0 if (my $w = delete $self->{'_message_waiter'})
331 0 0 unless $w->is_ready
355 0 0 unless ($deq_ok)
360 0 0 if $self->{'_closed'} or $self->{'_paused'}
364 0 0 unless defined $msg
365 0 0 if $self->{'_closed'} or $self->{'_paused'}
367 0 0 unless my $cb = $self->{'_on_message'}
370 0 0 if (builtin::blessed($result) and $result->isa("Future"))
372 0 0 unless ($cb_ok)
374 0 0 if $self->{'_closed'} or $self->{'_paused'}
384 0 0 if ++$iter % 32 == 0
398 0 4 if $self->{'_driver_step'} and not $self->{'_driver_step'}->is_ready
399 4 0 unless $self->{'_on_message'}
400 0 0 if $self->{'_closed'}
401 0 0 if $self->{'_paused'}
402 0 0 unless $self->channel_count > 0
404 0 0 unless my $redis = $self->{'redis'}
417 0 0 unless $msg
434 0 0 if $self->{'_closed'}
439 0 0 if (my $w = delete $self->{'_message_waiter'})
440 0 0 unless $w->is_ready
442 0 0 if (my $w = delete $self->{'_slot_waiter'})
443 0 0 unless $w->is_ready
448 0 0 if ($redis and defined $redis->{'_subscription'} and builtin::refaddr($redis->{'_subscription'}) == builtin::refaddr($self))
456 0 0 if (my $f = delete $self->{'_driver_step'})
457 0 0 unless $f->is_ready
467 0 0 if $self->{'_closed'}
473 0 0 if (my $w = delete $self->{'_message_waiter'})
474 0 0 unless $w->is_ready
476 0 0 if (my $w = delete $self->{'_slot_waiter'})
477 0 0 unless $w->is_ready
482 0 0 if ($redis and defined $redis->{'_subscription'} and builtin::refaddr($redis->{'_subscription'}) == builtin::refaddr($self))
490 0 0 if (my $f = delete $self->{'_driver_step'})
491 0 0 unless $f->is_ready
498 0 0 if (my $cb = $self->{'_on_error'})
501 0 0 unless ($ok)
508 0 0 if ($self->{'_on_message'})
528 0 0 if (my $w = delete $self->{'_message_waiter'})
529 0 0 unless $w->is_ready
535 0 0 if (my $f = delete $self->{'_driver_step'})
536 0 0 unless $f->is_ready
546 0 0 unless my $redis = $self->{'redis'}
566 0 0 if (my $cb = $self->{'_on_reconnect'})
571 0 0 $self->{'_on_message'} ? :
578 0 0 if $self->{'_closed'}
583 0 0 @channels ? :
593 0 0 if ($self->channel_count == 0)
604 0 0 if $self->{'_closed'}
608 0 0 @patterns ? :
615 0 0 if ($self->channel_count == 0)
626 0 0 if $self->{'_closed'}
630 0 0 @channels ? :
637 0 0 if ($self->channel_count == 0)
654 2 0 if @channels
657 1 1 if @patterns
660 0 2 if @sharded