Branch Coverage

blib/lib/Mojolicious/Plugin/AccessLog.pm
Criterion Covered Total %
branch 44 70 62.8


line true false branch
37 0 9 unless ($log)
46 4 5 if ($reftype eq 'GLOB') { }
2 3 elsif (&blessed($log) and my $l = $log->can('print') || $log->can('info')) { }
2 1 elsif ($reftype eq 'CODE') { }
1 0 elsif (defined $log and not ref $log) { }
57 0 1 unless 'File::Spec'->file_name_is_absolute($log)
60 0 1 unless my $fh = 'IO::File'->new($log, '>>')
72 0 9 if ($conf->{'uname_helper'})
79 0 0 unless $helper_name =~ /^[\_A-za-z]\w*$/u
89 0 69 if $TZOFFSET
90 0 69 if $NOEPOCHSECS
100 6 3 if ($format) { }
119 15 7 if $type eq 'i'
122 3 4 if $type eq 'o'
125 0 24 if $block eq 'sec'
127 0 24 if $block eq 'msec'
129 0 24 if $block eq 'usec'
131 6 18 if $block eq 'msec_frac'
133 0 18 if $block eq 'usec_frac'
137 4 0 if $type eq 't'
140 0 0 if $type eq 'C'
143 0 0 if $type eq 'e'
150 0 14 unless $_[3]->base->host
151 0 58 unless $_[0]->remote_address
157 2 58 unless $_[7] and $_[7] - $_[2]->header_size - $_[2]->start_line_size
160 15 1 $_[7] ? :
172 5 2 unless my $s = $_[3]->query->to_string
186 7 0 length($env->{'REMOTE_USER'} // '') ? :
7 44 exists $env->{'REMOTE_USER'} ? :
196 0 9 if ($conf->{'hostname_lookups'})
198 0 0 unless my $ip = $_[0]->remote_address
207 70 0 if $char_handler{$char}
220 22 70 $1 ? :
264 614 51 ref $_ ? :
271 155 0 if defined $string