Branch Coverage

blib/lib/Dir/Flock.pm
Criterion Covered Total %
branch 43 110 39.0


line true false branch
27 0 10 if (-f $rootdir and not -d $rootdir)
45 0 15 unless _validate_dir($dir)
54 0 13074 if $P
55 5 13069 if (defined $timeout and &Time::HiRes::time() > $expire)
57 0 5 if $P
61 1 13068 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
62 0 1 if $P
69 0 10 if $P
77 0 4 unless _validate_dir($dir)
86 0 3907 if $P
87 1 3906 if (defined $timeout and &Time::HiRes::time() > $expire)
89 0 1 if $P
93 0 3906 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
94 0 0 if $P
101 0 3 if $P
111 1 4 if ($op & 4)
114 3 2 if ($op & 2)
117 0 2 if ($op & 1)
120 2 0 if ($op & 8)
130 1 13 unless (defined $LOCK{$dir})
131 0 1 if &__inGD()
138 0 13 unless (defined $filename)
139 0 0 if &__inGD()
144 0 13 if $_DEBUG
145 0 13 unless (-f $filename)
146 0 0 if &__inGD()
153 13 0 if ($z)
154 0 13 if $_DEBUG
158 0 0 if &__inGD()
172 0 0 unless $ok
179 0 0 unless $ok
187 0 0 unless ($ok or &__inGD())
200 0 0 unless (lock_ex($dir, $timeout))
205 0 0 if (wantarray) { }
211 0 0 if ($@)
215 0 0 wantarray ? :
220 0 0 unless (lock_sh($dir, $timeout))
225 0 0 if (wantarray) { }
231 0 0 if ($@)
235 0 0 wantarray ? :
242 0 0 unless $ENV{'HOSTNAME'} or $^O eq 'MSWin32' and $ENV{'COMPUTERNAME'}
247 0 34029 $INC{'threads.pm'} ? :
265 0 16995 if ($excl)
268 16995 0 if @f1 > 0
274 0 1 unless $file
279 0 1 if $_DEBUG
280 0 1 if $_DEBUG
287 1 0 if ($host eq _host() or $host eq 'localhost') { }
292 0 1 if $_DEBUG
297 0 0 if $_DEBUG
300 1 0 if (not $status)
319 0 19 unless (-d $dir)
324 0 0 if (not -r $dir and -w $dir and -x $dir)
334 14 0 if (defined ${^GLOBAL_PHASE}) { }
335 0 1 if %{^GLOBAL_PHASE} eq 'DESTRUCT'