Branch Coverage

lib/Ubic/Lockf.pm
Criterion Covered Total %
branch 18 28 64.2


line true false branch
26 2 62 unless defined $fh
51 470 0 if (ref $param eq '') { }
52 0 470 unless open $fh, '>>', $param
58 384 86 unless (&_lockf($fh, $opts, $fname))
63 0 86 if defined $opts->{'mode'}
75 0 470 $opts->{'shared'} ? :
77 389 81 if (not $opts->{'blocking'} or defined $opts->{'timeout'} and not $opts->{'timeout'})
81 5 384 if flock $fh, $mode | 4
82 384 0 if $! == 11
86 1 80 if (not flock($fh, $mode | 4)) { }
88 0 1 if (-t STDOUT)
95 0 1 if ($opts->{'timeout'}) { }
98 0 0 unless flock $fh, $mode
100 0 1 unless flock $fh, $mode