Branch Coverage

blib/lib/Log/Dispatch/File.pm
Criterion Covered Total %
branch 30 38 78.9


line true false branch
73 23 45 if ($self->{'close_after_write'}) { }
31 14 elsif ($p{'mode'} =~ /^(?:>>|append)$/ or $p{'mode'} =~ /^\d+$/ and $p{'mode'} == O_APPEND()) { }
90 44 1 unless $self->{'close_after_write'} or $self->{'lazy_open'}
101 0 78 unless open my $fh, $self->{'mode'}, $self->{'filename'}
103 78 0 if ($self->{'autoflush'})
107 2 76 if ($self->{'permissions'} and not $self->{'chmodded'})
111 1 1 if ($current_mode ne $self->{'permissions'})
115 0 1 unless chmod $self->{'permissions'}, $self->{'filename'}
122 2 76 if ($self->{'binmode'})
124 0 2 unless binmode $fh, $self->{'binmode'}
134 3 25 if ($self->{'close_after_write'}) { }
1 24 elsif ($self->{'lazy_open'}) { }
144 2 26 if ($self->{'syswrite'}) { }
146 0 2 unless defined syswrite($fh, $p{'message'})
150 0 26 unless print $fh $p{'message'}
153 3 25 if ($self->{'close_after_write'})
154 0 3 unless close $fh
163 45 23 if ($self->{'fh'})
166 45 0 if &openhandle($fh)