Condition Coverage

blib/lib/Mail/SpamAssassin/PerMsgStatus.pm
Criterion Covered Total %
condition 91 221 41.1


and 3 conditions

line !l l&&!r l&&r condition
290 105 0 49 defined $opts and $opts->{'disable_auto_learning'}
343 96 0 0 &Mail::SpamAssassin::PerMsgStatus::time() > $master_deadline and not $self->{'deadline_exceeded'}
383 0 19 78 ($set & 2) == 0 and $self->{'main'}{'bayes_scanner'}
19 78 0 ($set & 2) == 0 and $self->{'main'}{'bayes_scanner'} and $self->{'main'}{'bayes_scanner'}->is_scan_available
97 0 0 ($set & 2) == 0 and $self->{'main'}{'bayes_scanner'} and $self->{'main'}{'bayes_scanner'}->is_scan_available and $self->{'conf'}{'use_bayes_rules'}
444 96 0 0 &Mail::SpamAssassin::PerMsgStatus::time() > $master_deadline and not $self->{'deadline_exceeded'}
454 79 4 13 $self->{'conf'}{'bayes_auto_learn'} && $self->{'conf'}{'use_bayes'}
472 10 2 0 defined $force_autolearn and $force_autolearn > 0
794 0 0 96 defined $mode and $mode eq 'dbg' || $mode eq 'collapsed'
940 0 0 16 length $str < 200 and @ary
0 4 12 length $str < 200 and @ary and $numlines-- > 0
1024 32 0 2 $self->{'is_spam'} and $self->{'conf'}{'report_safe'}
1105 0 0 0 defined $self->{'subjprefix'} and $self->{'subjprefix'} ne ''
1184 0 0 2 defined $ct and $ct ne ''
0 0 2 defined $ct and $ct ne '' and not $ct =~ m[text/plain]i
1254 0 0 32 @pristine_headers and $pristine_headers[$#pristine_headers] =~ /^\s*$/
1266 0 0 0 not defined $subject and $self->{'is_spam'}
0 0 0 not defined $subject and $self->{'is_spam'} and exists $self->{'conf'}{'rewrite_header'}{'Subject'}
1294 0 0 0 defined $self->{'subjprefix'} and defined $self->{'conf'}{'rewrite_header'}{'Subject'}
1315 0 32 0 not defined $subject and exists $self->{'conf'}{'rewrite_header'}{'Subject'}
1329 0 0 0 defined $self->{'subjprefix'} and defined $self->{'conf'}{'rewrite_header'}{'Subject'}
1356 0 32 0 @pristine_headers and $pristine_headers[0] =~ /^Return-Path:/i
1358 0 0 0 @pristine_headers and $pristine_headers[0] =~ /^[ \t]/
1718 38 0 0 defined $pad and $pad =~ /^(0+| +)$/
1813 95 0 1 defined $addr and $addr =~ /\@([^\@. \t]+\.[^@ \t]+?)[ \t]*\z/s
1820 39 0 57 defined $addr and $addr =~ /\@([^\@. \t]+\.[^@ \t]+?)[ \t]*\z/s
2089 3018 440 17 defined $result and $getaddr || $getname
2389 245 51 9 defined $schost and not is_fqdn_valid($schost, 1)
2562 127 275 16 $valid_domain and not %domains
2642 283 0 0 $self->can($function) and defined &{'Mail::SpamAssassin::PerMsgStatus::' . $function;}
2744 0 94 0 defined $self->{'subjprefix'} and $self->{'subjprefix'} ne ''
2845 186 0 0 defined $tflags_add and $tflags_add ne ''
2852 178 0 8 $already_hit and not +($tflags_ref->{$rule} || '') =~ /\bmultiple\b/
2895 178 0 0 $dups and @{$dups;}
2950 0 0 0 defined $envf and $envf =~ /\@/ || $envf eq ''
2980 33 0 0 $envf and $envf =~ /\@/
3068 0 4 0 defined $end_rcvd and $end_rcvd < 0
3086 0 0 0 defined $start_rcvd and not $include_start_rcvd
0 0 0 defined $start_rcvd and not $include_start_rcvd and $start_rcvd == $cur_rcvd_index
3088 0 0 0 defined $end_rcvd and not $include_end_rcvd
0 0 0 defined $end_rcvd and not $include_end_rcvd and $end_rcvd == $cur_rcvd_index
3091 0 0 17 !defined($start_rcvd) || $start_rcvd <= $cur_rcvd_index and !defined($end_rcvd) || $cur_rcvd_index < $end_rcvd
0 0 0 defined $end_rcvd and $cur_rcvd_index == $end_rcvd
3183 95 0 0 defined $resent and $resent =~ /\S/

or 2 conditions

line l !l condition
169 34 0 shift() || '*'
188 0 34 shift() || ','
194 0 0 shift() || ','
200 0 0 shift() || ','
207 0 0 shift() || ','
210 0 0 $scores->{$_} || '0'
220 3 0 $pms->{'tag_data'}{'REPORT'} || ''
749 0 0 $scores->{$_} || '0'
767 0 0 join(',', map(($_ . '=' . ($scores->{$_} || '0')), sort(@{$self->{'test_names_hit'};}))) || 'none'
880 34 0 $self->{'auto_learn_status'} || 'unavailable'
909 4 0 $report ||= '(no report template found)'
1022 2 32 $self->{'msg'}->get_mbox_separator || ''
2459 7 123 $self->{'msg'}{'metadata'}{'html'}{'uri_detail'} || {}
2529 418 0 $source ||= 'parsed'
2721 8 86 $area ||= ''
2743 34 60 $self->{'test_log_msgs'}{'LONG'} || ''
2850 8 178 $self->{'tests_already_hit'}{$rule} || 0
2852 8 0 $tflags_ref->{$rule} || ''
2860 144 34 $params{'ruletype'} ||= 'unknown'

or 3 conditions

line l !l&&r !l&&!r condition
261 0 154 0 ref $class || $class
302 0 0 154 $dbgcache or $self->{'save_pattern_hits'}
454 83 1 12 not $self->{'conf'}{'bayes_auto_learn'} && $self->{'conf'}{'use_bayes'} or $self->{'disable_auto_learning'}
794 96 0 0 $mode eq 'dbg' || $mode eq 'collapsed'
1087 0 2 0 $] < 5.008 or utf8::downgrade($report, 1)
1482 0 81 0 not defined $data or $data eq ''
2089 138 4 315 $getaddr || $getname
2133 3 0 1 $result =~ /^ \s* " (.*?) (?<!\\)" \s* < [^<>]* >/sx or $result =~ /^ \s* (.*?) \s* < [^<>]* >/sx
2377 41 60 0 $1 || $2 || $3
2723 1 0 93 $score >= 10 or $score <= -10
2841 176 0 10 not $value or $value <= 0
2847 0 0 0 !defined($_) || $_ eq ''
2875 122 0 56 not defined $rule_descr or $rule_descr eq ''
2950 0 0 0 $envf =~ /\@/ || $envf eq ''
3091 17 0 0 !defined($start_rcvd) || $start_rcvd <= $cur_rcvd_index
0 17 0 !defined($end_rcvd) || $cur_rcvd_index < $end_rcvd
3239 0 0 0 not defined $domain or $addrs_seen{lc $domain}++