Condition Coverage

blib/lib/Forks/Queue/SQLite.pm
Criterion Covered Total %
condition 85 147 57.8


and 2 conditions

line l !l condition
225 0 198 0 $z1 && $z2

and 3 conditions

line !l l&&!r l&&r condition
25 36 2 0 $opts{'join'} and not $opts{'db_file'}
28 33 5 0 $opts{'file'} and not $opts{'db_file'}
38 2 34 2 not $opts{'join'} and -f $opts{'db_file'}
42 36 0 2 $opts{'join'} && -f $opts{'db_file'}
135 2 12 33473 $self->{'_dbh'} and $$ == $self->{'_pid'}[0]
14 0 33473 $self->{'_dbh'} and $$ == $self->{'_pid'}[0] and $tid == $self->{'_pid'}[1]
162 0 0 35 $dbh && eval { do { $dbh->{'PrintWarn'} = $dbh->{'PrintError'} = 0; $dbh->begin_work; my $z1 = _try(3, sub { $dbh->do("DELETE FROM pids WHERE pid=$$ AND tid=$tid"); } ); if ($z1) { my $sth = $dbh->prepare('SELECT COUNT(*) FROM pids'); my $z2 = $sth->execute; $t = $sth->fetchall_arrayref; } else { print STDERR "$$ DESTROY: DELETE FROM pids failed\n" if $_DEBUG; $t = [[-2]]; } ; $dbh->commit; print STDERR "$$ DESTROY npids=$t->[0][0]\n" if $_DEBUG; 1 } }
183 0 0 35 $t and $t->[0]
0 13 22 $t and $t->[0] and $t->[0][0] == 0
197 27498 0 0 not $dbh and $self->{'_DESTROY'}
200 27300 0 0 not $sth and $self->{'_DESTROY'}
223 0 0 198 $z1 && _try(5, sub { $sth2->execute($key, $value); } )
384 127 21 1284 @items and $self->_avail < $limit
600 6 2 24 @items and $self->_avail < $limit
649 63 48 0 $lo > 0 and $block
660 41 0 70 $purge && $dbh->prepare('DELETE FROM the_queue WHERE item=? AND timestamp=? AND batchid=?')
670 0 0 24678 $sths && $sths->execute($limit)
671 0 0 24678 $sths && $sths->fetchall_arrayref
672 24678 0 0 $lo < 0 and -$lo > @$tt
676 102 0 24562 $block > 1 and $lo == 0
102 2 24560 $block > 1 and $lo == 0 and @$tt < $hi
747 0 0 0 $block and $self->_wait_for_item
837 68 0 17 defined $candidate and $candidate ne ''
68 0 17 defined $candidate and $candidate ne '' and -d $candidate
0 0 17 defined $candidate and $candidate ne '' and -d $candidate and -w _
0 0 17 defined $candidate and $candidate ne '' and -d $candidate and -w _ and -x _

or 2 conditions

line l !l condition
33 38 0 $opts{'limit'} //= -1
34 38 0 $opts{'on_limit'} //= 'fail'
35 38 0 $opts{'style'} //= 'fifo'
318 13 148 $status->{'end'} //= 0
416 2472 0 $Forks::Queue::SLEEP_INTERVAL || 1
430 8 0 $Forks::Queue::SLEEP_INTERVAL || 1
470 4 5 $_[0] // 1
492 16 7 CORE::shift() || 0
494 8 10 $_[0] // 1
730 0 0 $count ||= 1
780 36 3 $index ||= 0
791 13 6 $index ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
32 21 17 0 $opts{'db_file'} //= _impute_file()
158 0 0 35 $self->{'debug'} // $DEBUG
253 22 9 27232 $self->{'_end'} ||= $self->_status('end')
325 0 4007 0 $dbh ||= $self->_dbh
367 0 0 150 $self->{'debug'} // $DEBUG
415 6 1 2472 $self->_avail || $self->_end || $self->_expired
437 148 0 0 $dbh ||= $self->_dbh
521 6 4 0 $items[0] // ()
528 0 0 10 $self->{'debug'} // $DEBUG
676 0 14 24664 not $tt or @$tt == 0
713 27 2 24583 $self->_end or $self->_expired
718 53 0 0 $return[0] // ()
809 0 0 68 $self->{'debug'} // $DEBUG
850 0 0 0 $fh_dump ||= *STDERR