Branch Coverage

blib/lib/App/DistSync/LockFile.pm
Criterion Covered Total %
branch 28 58 48.2


line true false branch
210 2 0 @_ > 1 ? :
2 0 @_ ? :
221 0 2 unless $self->{'pid'} =~ /^[0-9]{1,11}$/
222 0 2 unless $self->{'retries'} =~ /^[0-9]{1,5}$/
223 0 2 unless $self->{'delay'} =~ /^[0-9]{1,5}$/
226 1 1 if $self->{'auto'}
234 3 8 if (scalar @_ >= 1)
242 0 2 if (scalar @_ >= 1)
250 1 2 if ($self->_is_locked)
263 2 0 if (open my $fh, '>', $tmp_file) { }
269 2 0 unless ($self->check)
270 2 0 if (rename $tmp_file, $self->file)
276 0 0 if ($self->{'retries'} and $try != $self->{'retries'})
278 0 0 unless $try == $self->{'retries'}
287 0 0 if -f $tmp_file
294 3 2 unless -f $self->file
297 2 0 if (open my $fh, $self->file) { }
300 2 0 if $line =~ /^\d+$/
304 2 0 if ($self->own == $self->pid)
310 0 0 if (kill 0, $self->own) { }
314 0 0 unless unlink $self->file
316 0 0 unless -f $self->file
329 1 0 if ($self->_is_locked) { }
330 0 1 unless unlink $self->file
332 1 0 unless -f $self->file
339 0 1 if -f $tmp_file
346 2 2 $self->{'_is_locked'} && -f $self->file ? :
350 0 7 if $self->{'debug'}
355 1 0 unless $self->{'auto'}