Branch Coverage

blib/lib/Mail/Log/Parse.pm
Criterion Covered Total %
branch 41 50 82.0


line true false branch
86 4 6 if defined $log_info{&refaddr($self)}{'filehandle'}
156 4 6 if (defined $parameters_ref->{'log_file'})
168 1 7 defined $parameters_ref->{'buffer_length'} ? :
202 4 2 if (-e $new_name) { }
203 4 0 if (-r $new_name) { }
208 1 3 if ($suffix) { }
212 0 1 unless eval { do { require IO::Uncompress::AnyUncompress } }
216 0 1 unless eval { do { require File::Temp } }
217 0 1 unless 'File::Temp'->VERSION(0.17)
222 0 1 unless anyuncompress($new_name, $temp)
224 0 1 unless $temp->seek(0, 0)
230 0 3 unless $log_info{$$self}{'filehandle'} = 'IO::File'->new($new_name, '<')
296 18 35 if (defined $parse_buffer{$$self} and $current_line + 1 <= $parse_buffer_start_line{$$self} + $#{$parse_buffer{$$self};} and $current_line + 1 >= $parse_buffer_start_line{$$self}) { }
312 32 3 if (defined $log_info{$$self}{'line_positions'}[$current_line])
313 0 32 unless $log_info{$$self}{'filehandle'}->setpos($log_info{$$self}{'line_positions'}[$current_line])
321 4 22 if (defined $parse_buffer{$$self}[0] and $#{$parse_buffer{$$self};} < $parse_buffer_size{$$self} and $current_line >= $parse_buffer_start_line{$$self})
334 2 2404 unless defined $parse_buffer{$$self}[$i]
365 2 2 if ($current_line{$$self} <= 1)
397 12 9 if (${$log_info{$$self}{'line_positions'};}[$current_line{$$self} + $lines]) { }
411 7 2 if ($self->next) { }
444 36 4 if ($current_line{$$self} - $lines > 0) { }
487 2 11 if (not $self->next) { }
526 32 2 if ($current_line{$$self} >= $line_number) { }
632 0 2404 unless do { $log_info{${$_[0];}} }->{'line_positions'}[$current_line{${$_[0];}}] = $log_info{${$_[0];}}{'filehandle'}->getpos
647 2406 2 if (defined $log_info{${$_[0];}}{'filehandle'}) { }