Condition Coverage

blib/lib/File/NFSLock.pm
Criterion Covered Total %
condition 46 69 66.6


and 3 conditions

line !l l&&!r l&&r condition
79 0 33 1134 @_ and ref $_[0]
101 0 1167 0 $self->{'lock_type'} and not $self->{'lock_type'} =~ /^\d+/
1167 0 0 $self->{'lock_type'} and not $self->{'lock_type'} =~ /^\d+/ and exists $$TYPES{$self->{'lock_type'}}
120 0 0 1167 $self->{'lock_type'} and $self->{'lock_type'} =~ /^\d+$/
133 1097 0 70 $self->{'blocking_timeout'} && !($self->{'lock_type'} & 4)
136 1024 136 7 -e $self->{'lock_file'} and $self->{'stale_lock_timeout'} > 0
1160 7 0 -e $self->{'lock_file'} and $self->{'stale_lock_timeout'} > 0 and time - (stat _)[9] > $self->{'stale_lock_timeout'}
164 23 15 175 -e $self->{'lock_file'} and open $fh, '+<', $self->{'lock_file'}
234 6 168 1 $try_lock_exclusive eq $has_lock_exclusive and @mine
250 192 9 0 $quit_time and time > $quit_time
282 70 0 2240 $SIG{$signal} and $SIG{$signal} eq $graceful_sig
329 211 0 1128 link($rand_file, $lock_file) && -e $rand_file && (stat _)[3] == 2
366 7 0 22 not $success and -e $lock_file
7 20 2 not $success and -e $lock_file and ((stat _)[2] & $SHARE_BIT) != $SHARE_BIT
435 7 1148 0 link($file, $rand_file) && unlink($rand_file)
506 0 0 6 defined $pid and not $self->{'unlocked'}

or 2 conditions

line l !l condition
75 1167 0 ref $type || $type || 'File::NFSLock'
87 1167 0 $self->{'file'} ||= ''
88 1167 0 $self->{'lock_type'} ||= 0
89 70 1097 $self->{'blocking_timeout'} ||= 0
90 64 1103 $self->{'stale_lock_timeout'} ||= 0
242 0 11 $errstr ||= 'NONBLOCKING lock failed!'

or 3 conditions

line l !l&&r !l&&!r condition
94 2246 0 88 not $SIG{$signal} or $SIG{$signal} eq 'DEFAULT'
310 28 1368 0 shift() || $self->{'rand_file'}
311 221 1175 0 $self->{'lock_line'} ||= "$HOSTNAME $self->{'lock_pid'} " . time . ' ' . int((rand()) * 10000) . "\n"