Branch Coverage

blib/lib/File/CounterFile.pm
Criterion Covered Total %
branch 30 44 68.1


line true false branch
15 0 1002 if ($] < 5.006) { }
45 0 50607 unless defined $file
47 0 50607 unless $file =~ m[^[\./]]
48 50605 2 unless defined $initial
53 0 50607 unless sysopen F, $file, 66
54 0 50607 unless flock F, 2
56 50504 103 if (defined $first_line) { }
57 0 50504 unless $first_line eq $File::CounterFile::MAGIC
67 0 50607 unless close F
86 0 59609 if $self->locked
91 0 59609 unless open $fh, "+<$file"
92 0 59609 unless flock $fh, 2
96 0 59609 if ($magic ne $File::CounterFile::MAGIC)
111 50606 59609 unless $self->locked
115 10008 49601 if ($$self{'updated'})
118 0 10008 unless seek $fh, 0, 0
123 0 59609 unless close $fh
133 4 10006 if ($self->locked) { }
150 1 2 if ($self->locked) { }
151 0 1 unless ($$self{'value'} =~ /^\d+$/)
160 1 1 unless ($$self{'value'} =~ /^\d+$/)
176 2 49600 if ($self->locked) { }