Branch Coverage

blib/lib/File/TinyLock.pm
Criterion Covered Total %
branch 23 50 46.0


line true false branch
129 0 2 if (@_ % 2) { }
137 0 2 unless $args{'lock'}
142 0 2 unless defined $args{'retries'}
143 2 0 unless defined $args{'retrydelay'}
146 2 0 if ($$self{'mylock'}) { }
148 0 2 if ($$self{'lock'} eq $$self{'mylock'}) { }
0 2 elsif ($_mylocks{$$self{'mylock'}}) { }
0 2 elsif (-f $$self{'mylock'}) { }
159 0 0 unless ($_mylocks{$mylock} or -f $mylock)
164 0 0 unless $$self{'mylock'}
176 2 0 if (open my $fh, '>', $$self{'mylock'}) { }
181 1 1 unless ($self->checklock)
182 1 0 if (link $$self{'mylock'}, $$self{'lock'})
188 0 1 if ($$self{'retries'} and $try != $$self{'retries'})
190 0 0 unless $try == $$self{'retries'}
204 1 1 if (open my $fh, $$self{'lock'}) { }
213 1 0 if (kill 0, $pid) { }
217 0 0 unless ($$self{'lock'} eq $mylock)
218 0 0 unless unlink $mylock
220 0 0 unless unlink $$self{'lock'}
234 1 1 if (-f $$self{'mylock'})
235 0 1 unless unlink $$self{'mylock'}
238 1 1 if ($$self{'_have_lock'})
239 0 1 unless unlink $$self{'lock'}
258 0 5 if $$self{'debug'}