Branch Coverage

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


line true false branch
38 0 9 unless ($log)
47 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) { }
59 0 1 unless 'File::Spec'->file_name_is_absolute($log)
62 0 1 unless $fh = 'IO::File'->new($log, '>>')
74 0 9 if ($$conf{'uname_helper'})
81 0 0 unless $helper_name =~ /^[\_A-za-z]\w*$/
91 0 69 if $TZOFFSET
92 0 69 if $NOEPOCHSECS
102 6 3 if ($format) { }
120 15 7 if $type eq 'i'
123 3 4 if $type eq 'o'
126 0 24 if $block eq 'sec'
128 0 24 if $block eq 'msec'
130 0 24 if $block eq 'usec'
132 6 18 if $block eq 'msec_frac'
134 0 18 if $block eq 'usec_frac'
138 4 0 if $type eq 't'
141 0 0 if $type eq 'C'
144 0 0 if $type eq 'e'
151 0 14 unless $_[3]->base->host
152 0 58 unless $_[0]->remote_address
158 2 58 unless $_[7] and $_[7] - $_[2]->header_size - $_[2]->start_line_size
161 15 1 $_[7] ? :
173 5 2 unless my $s = $_[3]->query->to_string
184 7 0 length($$env{'REMOTE_USER'} // '') ? :
7 44 exists $$env{'REMOTE_USER'} ? :
197 0 9 if ($$conf{'hostname_lookups'})
199 0 0 unless my $ip = $_[0]->remote_address
208 70 0 if $char_handler{$char}
221 22 70 $1 ? :
261 614 51 ref $_ ? :
268 155 0 if defined $string