Branch Coverage

blib/lib/Fennec/Collector/TB/TempFiles.pm
Criterion Covered Total %
branch 27 46 58.7


line true false branch
33 267 433 if ($$ == $self->_pid)
43 309 124 if ($self->handles->{$$}) { }
48 0 124 unless open $handle, '>', $path
61 1099 8542 unless $self->_pid == $$
64 8444 98 if ($self->handles->{'tempdir'}) { }
69 0 98 unless opendir $handle, $self->tempdir
75 17084 92762 unless -f $path
76 91948 814 unless $path =~ /\.ready$/
77 0 814 unless open my $fh, '<', $path
81 0 3226 unless $line
83 0 3226 unless $handle and $source
90 0 814 unless rename $path, "$path.done"
96 1 22 unless $self->_pid == $$
98 0 22 if $self->handles->{$$}
107 0 22 if grep {/^\d+(\.ready)?$/;} readdir $handle
109 22 0 if (not $ENV{'FENNEC_DEBUG'})
112 44 109 unless $file =~ /\.done$/
113 0 109 unless unlink $self->tempdir . '/' . $file
116 0 22 unless rmdir $self->tempdir
122 0 0 unless $self->tempdir
124 0 0 unless -e $path
125 0 0 unless close $self->handles->{$$}
126 0 0 unless rename $path, "$path.ready"