Branch Coverage

blib/lib/App/DistSync/Lock.pm
Criterion Covered Total %
branch 0 42 0.0


line true false branch
139 0 0 if (exists $self->{'pid'} and defined $self->{'pid'}) { }
140 0 0 unless $self->{'pid'} =~ /^[0-9]{1,11}$/
146 0 0 if (exists $self->{'hold'} and defined $self->{'hold'}) { }
147 0 0 unless $self->{'hold'} =~ /^[0-9]{1,11}$/
158 0 0 if ($file and -e $file)
159 0 0 unless (open RD_LOCK_FILE, '<', $file)
165 0 0 unless defined $l
166 0 0 unless (close RD_LOCK_FILE)
170 0 0 if ($l eq $str) { }
176 0 0 if ($r_pid and $self->running($r_pid))
179 0 0 if ($hold > 0 and $stamp - $r_stamp > $hold) { }
180 0 0 unless (unlink $file)
194 0 0 unless (open MY_LOCK_FILE, '>', $file)
198 0 0 unless (print MY_LOCK_FILE sprintf("%s\n", $str))
202 0 0 unless (close MY_LOCK_FILE)
225 0 0 unless defined $pid
226 0 0 unless $pid
227 0 0 unless ($pid =~ /^[0-9]{1,11}$/)
231 0 0 kill(0, $pid) ? :
240 0 0 unless $file and $status and -e $file
241 0 0 unless unlink $file