Branch Coverage

blib/lib/Mail/SpamAssassin/Plugin/AWL.pm
Criterion Covered Total %
branch 23 96 23.9


line true false branch
172 0 0 if (not defined $value or $value eq '') { }
0 0 elsif (not $value =~ /^\d+$/ or $value < 0 or $value > 32) { }
203 0 0 if (not defined $value or $value eq '') { }
0 0 elsif (not $value =~ /^\d+$/ or $value < 0 or $value > 128) { }
288 0 61 unless (defined $value and not $value =~ /^$/)
291 0 61 if (-d $value)
339 0 0 unless ($value =~ /^0?[0-7]{3}$/)
410 64 17 unless $pms->{'conf'}{'use_auto_whitelist'}
416 7 10 unless $from =~ /\S/
422 0 1 if $rly->{'ip_private'}
423 1 0 if ($rly->{'ip'})
432 10 0 if defined $signedby and $signedby eq ""
437 0 50 unless $scores->{$test}
438 0 50 if exists $tflags->{$test} and $tflags->{$test} =~ /\bnoautolearn\b/
439 0 50 if exists $tflags->{$test} and $tflags->{$test} =~ /\bnoawl\b/
459 7 3 !defined($meanscore) ? :
0 10 $signedby ? :
464 3 7 if (defined $meanscore)
469 3 0 if (defined $meanscore)
479 8 2 unless ($pms->{'disable_auto_learning'})
489 2 8 if ($delta != 0)
496 0 10 unless (eval {
497 0 0 $@ ne '' ? :
500 0 0 if $whitelist
513 0 0 unless $self->{'main'}{'conf'}{'use_auto_whitelist'}
515 0 0 unless ($args->{'address'})
516 0 0 if $args->{'cli_p'}
527 0 0 if ($whitelist->add_known_bad_address($args->{'address'}, $args->{'signedby'})) { }
528 0 0 if $args->{'cli_p'}
533 0 0 if $args->{'cli_p'}
539 0 0 unless (eval {
540 0 0 $@ ne '' ? :
552 0 0 unless $self->{'main'}{'conf'}{'use_auto_whitelist'}
554 0 0 unless ($args->{'address'})
555 0 0 if $args->{'cli_p'}
566 0 0 if ($whitelist->add_known_good_address($args->{'address'}, $args->{'signedby'})) { }
567 0 0 if $args->{'cli_p'}
572 0 0 if $args->{'cli_p'}
579 0 0 unless (eval {
580 0 0 $@ ne '' ? :
592 0 0 unless $self->{'main'}{'conf'}{'use_auto_whitelist'}
594 0 0 unless ($args->{'address'})
595 0 0 if $args->{'cli_p'}
606 0 0 if ($whitelist->remove_address($args->{'address'}, $args->{'signedby'})) { }
607 0 0 if $args->{'cli_p'}
612 0 0 if $args->{'cli_p'}
619 0 0 unless (eval {
620 0 0 $@ ne '' ? :