Branch Coverage

blib/lib/Forks/Queue/SQLite.pm
Criterion Covered Total %
branch 160 246 65.0


line true false branch
25 0 38 if ($opts{'join'} and not $opts{'db_file'})
28 0 38 if ($opts{'file'} and not $opts{'db_file'})
38 2 36 if (not $opts{'join'} and -f $opts{'db_file'})
49 36 2 if (not $exists) { }
53 2 34 unless (eval { do { $self->_init } })
60 5 31 if (defined $list)
61 5 0 if (ref $list eq 'ARRAY') { }
77 29462 0 if $] >= 5.014
81 0 0 if --$count <= 0
84 0 0 if $DEBUG
98 2 34 unless ($z1)
104 0 34 unless ($z2)
111 0 34 unless ($z3)
117 0 34 unless ($z4)
130 0 33686 $INC{'threads.pm'} ? :
135 33473 12 if ($self->{'_dbh'} and $$ == $self->{'_pid'}[0] and $tid == $self->{'_pid'}[1])
143 12 2 unless ($self->{'_DESTROY'})
160 35 0 $self->{'_pid'} ? :
182 35 0 if $dbh
183 22 13 if ($t and $t->[0] and $t->[0][0] == 0) { }
184 0 22 if $_DEBUG
185 20 2 if (not $self->{'persist'})
197 0 0 if not $dbh and $self->{'_DESTROY'}
198 27300 198 if (@_ == 1) { }
198 0 elsif (@_ == 2) { }
200 0 0 if (not $sth and $self->{'_DESTROY'})
208 0 27300 unless ($z)
213 27232 68 if (@$t == 0)
237 0 8 if ($end)
242 8 0 unless ($end)
267 0 75 if $XDEBUG
273 0 4 if $XDEBUG
287 3 30 unless ($self->{'_limit_magic'})
289 0 3 if $XDEBUG
291 10 23 if (@_) { }
293 0 10 if $XDEBUG
295 6 4 if (@_)
296 0 6 if $XDEBUG
302 0 23 if $XDEBUG
326 0 4007 unless $dbh
328 0 4007 unless $sth
369 2 148 if ($self->_end)
376 109 39 if $self->{'limit'} <= 0
390 21 127 if (@items > 0)
394 145 3 if $pushed
396 21 127 if ($failed_items)
397 13 8 if ($self->{'on_limit'} eq 'fail') { }
401 0 8 if $_DEBUG
404 0 8 if $_DEBUG
416 2472 7 unless $ready
423 0 8 if ($self->{'limit'} <= 0)
428 8 8 if $self->_avail < $self->{'limit'}
429 0 8 if $self->_end
441 0 148 if (@$tt == 0) { }
450 8 0 if @_
451 3 0 if ($self->{'style'} ne 'lifo') { }
452 3 0 @_ ? :
455 0 0 @_ ? :
463 21 16 @_ ? :
468 4 5 if @_
471 4 5 @_ ? :
477 0 1 @_ ? :
483 0 2 @_ ? :
485 0 2 @_ ? :
491 24 2 if @_
493 13 10 if @_
498 9 9 if ($self->{'style'} eq 'lifo')
502 0 18 if ($count <= 0)
506 8 10 if ($index < 0)
507 0 8 if ($index + $count > 0)
518 9 9 if ($reverse)
521 8 10 @_ ? :
530 0 10 if ($self->_end)
537 0 10 if $self->{'limit'} <= 0
539 2 8 if ($pos >= $self->_avail)
542 2 6 if ($pos <= -$self->_avail)
546 2 6 if ($pos < 0)
562 8 0 if (@$tt > 0) { }
569 0 8 if (@$tt == $pos) { }
2 6 elsif ($pos == 0) { }
573 0 0 if ($t2 < 0) { }
587 6 2 if ($t1 == $t2) { }
596 0 2 if ($t3 == $t1)
607 2 6 if (@items > 0)
610 2 6 if (@deferred_items)
611 2 0 if ($self->{'on_limit'} eq 'fail') { }
615 0 0 if $_DEBUG
618 0 0 if $_DEBUG
622 8 0 if $inserted
639 51 60 @_ ? :
640 0 111 if $hi <= $lo
649 0 111 if ($lo > 0 and $block)
654 39 72 $tfactor > 0 ? :
663 0 111 unless ($sths)
668 0 24678 $lo < 0 ? :
672 0 24678 if ($lo < 0 and -$lo > @$tt)
676 14 24664 if (not $tt or @$tt == 0) { }
24560 104 elsif ($block > 1 and $lo == 0 and @$tt < $hi) { }
6 98 elsif (@$tt <= $lo) { }
678 7 7 if ($block) { }
693 12 86 if $hi > @$tt
696 0 437 unless (defined $tt->[$itt])
701 399 38 if ($purge)
704 0 399 unless ($zd)
712 24612 53 if ($block)
713 29 24583 if ($self->_end or $self->_expired)
718 45 53 @_ ? :
733 0 0 if ($tfactor > 0)
746 0 0 if (@$tt == 0)
747 0 0 if ($block and $self->_wait_for_item) { }
756 0 0 if ($purge)
759 0 0 unless ($zd)
766 0 0 $wantarray ? :
781 17 22 if ($index < 0)
792 0 19 if ($index < 0)
800 0 161 unless $Forks::Queue::NOTIFY_OK
808 68 93 if (@pids)
809 0 68 if $self->{'debug'} // $DEBUG
812 161 79 if $_->[0] == $$
813 0 161 if (@tids)
816 0 0 if $thr
828 0 17 if ($^O eq 'MSWin32') { }
837 17 0 if (defined $candidate and $candidate ne '' and -d $candidate and -w _ and -x _)