Branch Coverage

blib/lib/ApacheLog/Compressor.pm
Criterion Covered Total %
branch 52 78 66.6


line true false branch
252 0 2 unless defined $$data{'url'}
277 0 2 $$data{'ver'} eq '1.0' ? :
280 2 0 $$data{'ver'} ? :
289 1 1 $$data{'size'} eq '-' ? :
292 1 1 $$data{'size'} == 4294967295 ? :
327 0 70 unless ref $v
328 60 10 if (exists $$v{'regex'})
332 30 40 if (exists $$v{'process_in'})
335 20 50 if (exists $$v{'process_out'})
340 5 65 unless $type
346 15 50 if ($type =~ /^C(\d+)/) { }
25 25 elsif ($type =~ /^n(\d+)/) { }
25 0 elsif ($type =~ /^N(\d+)/) { }
373 2 10 unless defined $v
375 12 0 unless (defined $id)
393 0 13 unless defined $$self{'entry_index'}{$type}[$id]
410 0 12 if $$self{"on_set_$type"}
411 0 12 if $$self{'on_set_key'}
425 1 2 unless @data{@{$$self{'log_regex_keys'};}} = $txt =~ /$$self{'log_regex'}/
429 0 2 if exists $$self{'filter'} and not $$self{'filter'}($self, \%data)
431 2 0 if (not defined $$self{'timestamp'} or $data{'timestamp'} != $$self{'timestamp'})
441 26 2 if ($$v{'type'})
442 12 14 if exists $$v{'id'}
449 0 2 if ($$self{'log_packet_count'}++ >= 5000000)
468 4 12 if $self->can($method)
534 0 18 unless ($$self{'packet_handler'}{$type})
539 6 12 if $self->can($method)
541 0 12 unless index($$pkt, "\000", 5) >= 0
572 0 2 unless length $$pkt >= $$self{'log_record_length'}
578 0 2 unless $$self{'timestamp'}
579 2 0 if exists $$self{'on_log_line'}
597 0 0 unless defined $info{'query'} and length $info{'query'}
615 0 2 unless defined $q
616 0 2 length $q ? :
2 0 $$data{'ver'} ? :
641 0 2 unless index($$pkt, "\000", 1) >= 0
657 0 2 unless length $$pkt >= 5
661 0 2 unless $$self{'timestamp'}
674 0 1 unless my $code = $$self{'on_' . $event} || $self->can('on_' . $event)