Branch Coverage

blib/lib/Lazy/Lockfile.pm
Criterion Covered Total %
branch 20 40 50.0


line true false branch
121 3 0 if (ref $params ne 'HASH') { }
125 0 0 unless (defined $params)
131 3 0 if (not defined $lockfile_location or $lockfile_location eq '')
139 0 3 unless sysopen $lock, $lockfile_location, 131138, 420
141 3 0 if (flock $lock, 6)
146 0 3 if ($lock_tries > 5)
154 1 2 if (defined $file_pid)
164 1 0 if (defined $file_pid and $file_pid ne '' and $file_pid == 0 || (kill(0, $file_pid) || $!{'EPERM'}))
176 0 2 if ($params->{'no_pid'}) { }
188 0 2 if (not defined $r or $r != length $lockfile_contents)
200 0 2 if (defined $params->{'delete_on_destroy'}) { }
201 0 0 $params->{'delete_on_destroy'} ? :
233 0 1 if (not defined $new_setting) { }
236 0 1 $new_setting ? :
270 2 1 if ($self and $self->{'lockfile_location'} and $self->{'delete_on_destroy'})
273 0 2 unless open $lock, '<', $self->{'lockfile_location'}
275 2 0 if (flock $lock, 6)
280 0 2 if ($lock_tries > 5)
283 2 0 if defined $file_pid
284 2 0 if (defined $file_pid and $file_pid == 0 || $file_pid == $$)