Branch Coverage

blib/lib/Mail/SpamAssassin/Plugin/Pyzor.pm
Criterion Covered Total %
branch 2 80 2.5


line true false branch
58 61 1 if ($mailsaobject->{'local_tests_only'}) { }
163 0 0 unless ($value =~ m[^([0-9A-Za-z ,._/-]+)$])
186 0 0 unless (defined $value and length $value)
190 0 0 unless (-x $value)
206 0 0 unless ($pyzor)
209 0 0 unless ($pyzor and -x $pyzor)
224 0 0 if (not $self->{'main'}{'conf'}{'use_pyzor'}) { }
0 0 elsif ($self->is_pyzor_available) { }
248 0 0 unless $self->{'pyzor_available'}
283 0 0 unless $pid
288 0 0 unless defined $nread
291 0 0 unless close PYZOR
292 0 0 if (proc_status_ok($?, $errno)) { }
0 0 elsif (proc_status_ok($?, $errno, 0, 1)) { }
300 0 0 unless (@response)
308 0 0 if ($response[0] =~ /^Traceback/)
314 0 0 if (defined fileno PYZOR)
315 0 0 if ($pid)
316 0 0 if (kill 'TERM', $pid) { }
319 0 0 unless close PYZOR
320 0 0 unless proc_status_ok($?, $errno)
325 0 0 if ($timer->timed_out)
330 0 0 if ($err)
332 0 0 if ($err eq '__brokenpipe__ignore__') { }
0 0 elsif ($err eq 'no response') { }
344 0 0 if ($one_response =~ /^\S+\t.*?\t(\d+)\t(\d+)\s*$/) { }
356 0 0 $pyzor_whitelisted ? :
359 0 0 if ($pyzor_count >= $self->{'main'}{'conf'}{'pyzor_max'})
370 0 0 unless $self->{'pyzor_available'}
371 0 0 unless $self->{'main'}{'conf'}{'use_pyzor'}
373 0 0 if (not $options->{'report'}{'options'}{'dont_report_to_pyzor'} and $self->is_pyzor_available)
377 0 0 if ($self->pyzor_report($options, $tmpf)) { }
409 0 0 unless $pid
414 0 0 unless defined $nread
416 0 0 if $nread_all < 1
418 0 0 unless close PYZOR
422 0 0 if (proc_status_ok($?, $errno, 0)) { }
432 0 0 if ($timer->timed_out)
437 0 0 if ($err)
439 0 0 if ($err eq '__brokenpipe__ignore__') { }