Branch Coverage

blib/lib/Log/Log4perl/Appender/File.pm
Criterion Covered Total %
branch 65 110 59.0


line true false branch
42 2 47 if ($self->{'create_at_logtime'})
46 50 48 if (defined $self->{$param} and $self->{$param} =~ /^0/)
53 0 49 unless exists $self->{'filename'}
57 0 49 if ($self->{'recreate_pid_write'})
60 0 0 unless open FILE, ">$self->{'recreate_pid_write'}"
73 47 2 unless $self->{'create_at_logtime'}
83 2 7 if ($self->{'syswrite'} and $self->{'utf8'})
88 0 2 if ($@) { }
115 39 19 if ($self->{'mode'} eq 'append') { }
0 19 elsif ($self->{'mode'} eq 'pipe') { }
128 2 27 if ($didnt_exist and $self->{'mkpath'})
130 2 0 if ($path ne "" and not -e $path)
131 2 0 if defined $self->{'mkpath_umask'}
134 0 4 if defined $self->{$param}
139 2 0 if defined $old_umask
140 0 2 if $@
144 1 57 if defined $self->{'umask'}
147 11 47 if ($self->{'syswrite'}) { }
148 0 11 unless sysopen $fh, "$self->{'filename'}", $sysmode
151 0 47 unless open $fh, "$arrows$self->{'filename'}"
155 1 57 if defined $old_umask
156 0 58 if $@
158 0 29 if ($didnt_exist and defined $self->{'owner'} || defined $self->{'group'})
164 0 0 if ($@)
171 19 39 if ($self->{'recreate'})
177 19 0 defined $self->{'recreate_check_interval'} ? :
7 12 defined $self->{'recreate_check_signal'} ? :
183 47 11 if ($self->{'autoflush'} and not $self->{'syswrite'})
189 2 56 if (defined $self->{'binmode'})
193 3 55 if ($self->{'utf8'})
195 1 2 unless ($self->{'syswrite'})
200 2 56 if (defined $self->{'header_text'})
201 2 0 unless ($self->{'header_text'} =~ /\n\Z/)
217 9 2 if (defined $self->{'fh'})
233 0 0 unless (defined $uid)
239 0 0 if (defined $self->{'owner'})
241 0 0 unless ($self->{'owner'} =~ /^\d+$/)
243 0 0 unless defined $uid
247 0 0 if (defined $self->{'group'})
249 0 0 unless ($self->{'group'} =~ /^\d+$/)
252 0 0 unless defined $gid
255 0 0 if ($uid != $uid_org or $gid != $gid_org)
256 0 0 unless chown $uid, $gid, $self->{'filename'}
284 20 49 if ($self->{'recreate'})
285 9 11 if ($self->{'recreate_check_signal'}) { }
286 4 5 if (not $self->{'watcher'} or $self->{'watcher'}{'signal_caught'})
292 6 5 if (not $self->{'watcher'} or $self->{'watcher'}->file_has_moved)
301 13 56 if ($self->{'syswrite'}) { }
306 2 11 $self->{'syswrite_encoder'} ? :
308 0 13 if (not defined $rc)
313 0 56 unless print $fh $params{'message'}
322 47 0 if ($self->{'fh'})
341 0 56 unless ($rc)
342 0 0 if ($self->{'mode'} eq 'pipe' and $!{'ECHILD'}) { }
344 0 0 if ($Log::Log4perl::CHATTY_DESTROY_METHODS)