Branch Coverage

blib/lib/Future/Q.pm
Criterion Covered Total %
branch 59 68 86.7


line true false branch
32 1 1070 if defined $super_destroy
37 0 1071 if (in_global_destruction)
41 104 925 if ($self->is_ready and $self->failure and not $failure_handled_for{$id})
49 16 0 if blessed $f and $f->can('_q_warn_failure')
63 120 0 if ($self->is_ready and $self->failure)
65 16 104 $options{'is_subfuture'} ? :
68 117 3 if (defined $OnError and ref $OnError eq 'CODE') { }
78 7 186 if (not defined $func or ref $func ne 'CODE')
85 96 67 if (scalar @results == 1 and blessed($results[0]) and $results[0]->isa('Future')) { }
103 4 323 if (defined $on_fulfilled and ref $on_fulfilled ne 'CODE')
106 1 326 if (defined $on_rejected and ref $on_rejected ne 'CODE')
115 98 221 if ($invo_future->is_cancelled)
116 98 0 if $next_future->is_pending
120 79 142 if ($invo_future->is_rejected and defined $on_rejected) { }
54 126 elsif ($invo_future->is_fulfilled and defined $on_fulfilled) { }
127 178 149 if ($next_future->is_pending and $self->is_pending)
130 12 83 if (defined $invo_future and $invo_future->is_pending)
150 4 307 unless (@result == 1 and blessed($result[0]) and $result[0]->isa('Future'))
153 7 300 if $self->is_cancelled
165 0 297 if $self->is_ready
166 53 244 if ($base_future->is_cancelled) { }
102 142 elsif ($base_future->failure) { }
169 97 5 if ($base_future->can('_q_set_failure_handled'))
177 76 224 unless ($base_future->is_ready)
180 14 43 if defined $weak_base and not $weak_base->is_ready
211 0 99 unless blessed $sub and $sub->can('_q_set_failure_handled')
222 0 53 if (not defined $callback or ref $callback ne 'CODE')
228 17 36 if ($invo_future->is_cancelled)
229 17 0 if $next_future->is_pending
235 13 23 if (not $returned_future->is_cancelled and $returned_future->failure) { }
241 16 20 if (not $returned_future->is_ready)
244 2 0 if defined $weak_returned and not $weak_returned->is_ready
248 27 26 unless ($self->is_ready)
251 1 9 if defined $weak_invo and not $weak_invo->is_ready