Branch Coverage

blib/lib/Apache/Log/Parser.pm
Criterion Covered Total %
branch 77 88 87.5


line true false branch
31 0 10 unless $args{'strict'} xor $args{'fast'}
33 0 10 exists $args{'verbose'} ? :
35 5 5 if ($args{'strict'}) { }
36 2 3 ref $args{'strict'} ? :
37 2 3 if (scalar @formats > 0) { }
39 2 7 if ($formats[$i] eq 'common') { }
2 5 elsif ($formats[$i] eq 'combined') { }
1 4 elsif ($formats[$i] eq 'debug') { }
1 3 elsif ($formats[$i] eq 'vhost_common') { }
52 0 3 unless (length $formats[$i][0] > 0 and scalar reduce(sub { $a += scalar grep({$_ eq $b;} @REQUIRED_FIELDS); } , 0, @{$formats[$i][1];}) == scalar @REQUIRED_FIELDS)
67 2 3 if (ref $args{'fast'} and scalar @{$args{'fast'};} > 0) { }
71 2 5 if ($arg eq 'common') { }
2 3 elsif ($arg eq 'combined') { }
1 2 elsif ($arg eq 'debug') { }
2 0 elsif (ref $arg) { }
99 8 5 $a > $b ? :
118 0 33 unless (defined $$pairs{'status'} and $$pairs{'status'} ne '' and defined $$pairs{'request'} and $$pairs{'request'} ne '' and defined $$pairs{'datetime'} and $$pairs{'datetime'} ne '')
121 0 5 if $$self{'verbose'}
129 53 37 defined $values[$x] ? :
130 30 60 unless defined $v
133 33 30 if scalar keys %result >= $$ref[0] + 13
135 0 0 if $$self{'verbose'}
141 3 259 unless substr($str, 0, 1) eq '"'
149 377 263 if substr($part, -1, 1) ne '"'
150 258 5 if substr($part, -2, 1) ne '\\'
154 5 15 unless $c eq '\\' and $backslash_count += 1
168 1039 487 unless ($continuing)
169 257 782 if (substr($part, 0, 1) eq '"') { }
123 659 elsif (substr($part, 0, 1) eq '[') { }
170 108 149 if (has_unquoted_tail_doublequote($part)) { }
178 10 113 if (substr($part, -1, 1) eq ']') { }
191 374 113 if ($continuing == $flag_in_quoted) { }
113 0 elsif ($continuing == $flag_in_bracket) { }
193 225 149 unless has_unquoted_tail_doublequote($part)
201 0 113 if substr($part, -1, 1) ne ']'
224 11 101 if scalar @values < 2
232 701 6 if $a
1 100 unless reduce sub { defined $$pairs{$b} if $a; } , 1, ('bytes', 'status', 'request', 'datetime', 'user', 'logname', 'rhost')
236 84 16 if ($$pairs{'request'} =~ m[^(.*) (HTTP/\d\.\d)$]) { }
245 287 13 if $a
10 90 unless reduce sub { defined $$pairs{$b} if $a; } , 1, ('path', 'time', 'date')
247 49 41 if defined $$rule[2] and not $$rule[2]($pairs)
251 0 1 if $$self{'verbose'}
257 42 38 if ($$self{'strict'})