Branch Coverage

blib/lib/Mail/SpamAssassin/AsyncLoop.pm
Criterion Covered Total %
branch 52 170 30.5


line true false branch
52 41 0 'Time::HiRes'->can('clock_getres') ? :
56 0 41 unless (eval {
93 0 0 if ($domain =~ /\[/) { }
100 0 0 if $domain eq ""
102 0 0 $domain =~ /^ (?: [^.]* ) \. (.*) \z/sx ? :
104 0 0 if (@search_keys > 20)
179 0 13 unless defined $id and $id ne ""
180 0 13 unless $key
181 0 13 unless $ent->{'type'}
184 13 0 unless defined $ent->{'start_time'}
190 0 13 if (defined $zone and $conf_by_zone)
194 0 0 if (exists $conf_by_zone->{$zone}) { }
0 0 elsif ($zone eq '') { }
200 0 0 $zone =~ /^( (?: [^.] | \[ (?: \\. | [^\]\\] )* \] )* )
206 0 13 if $settings
209 0 13 if $settings and not defined $t_init
210 13 0 unless defined $t_init
211 0 13 unless defined $t_init
214 0 13 if $settings and not defined $t_end
215 13 0 unless defined $t_end
216 13 0 unless defined $t_end
217 0 13 if $t_end < 0
218 0 13 if $t_init < $t_end
221 13 0 if (defined $master_deadline)
223 0 13 if $time_avail < "0.5"
224 0 13 if ($t_init > $time_avail)
226 0 0 if $t_end > $time_avail
234 0 65 ref $ent->{$_} ? :
243 13 0 !$clipped_by_master_deadline ? :
260 0 135 unless $ent
265 0 135 unless exists $ent->{'type'}
266 0 135 unless $cb
273 122 13 if ($dns_query_info) { }
275 0 122 unless defined $id
277 0 122 unless lc $id_tail eq lc $dnskey
281 122 0 if (not $pkt) { }
290 0 0 if (not $cb) { }
297 0 0 unless (eval {
300 0 0 if $@ =~ /__alarm__ignore__\(.*\)/s
312 0 13 if ($dns_query_blockages)
316 0 0 if defined $blocked
319 0 13 if ($blocked) { }
327 0 13 if ($pkt_id ne $id)
336 135 0 if ($appl_cb)
339 0 135 !defined($appl_ent->{'rulename'}) ? :
343 0 135 unless (eval {
346 0 0 if $@ =~ /__alarm__ignore__\(.*\)/s
353 0 13 if not $cb_count
356 0 13 unless defined $id
423 0 0 if (defined $timeout and $timeout > 0 and %$pending and $self->{'total_queries_started'} > 0)
436 0 0 if not defined $max_deadline or $deadline > $max_deadline
439 0 0 if (defined $max_deadline)
441 0 0 if $timer_resolution == 1 and $max_deadline > int $max_deadline
444 0 0 if $sufficient_timeout < 0
445 0 0 if ($timeout > $sufficient_timeout)
458 3 3156 if (%$pending)
461 3 0 !$nfound ? :
473 13 0 if (exists $self->{'finished'}{$id})
476 0 13 unless defined $ent->{'finish_time'}
486 0 3159 if (%$pending)
489 0 0 !($allow_aborting_of_expired && $self->{'total_queries_started'}) ? :
496 0 0 if $timer_resolution == 1 and $dt > int $dt
497 0 0 if $now <= $ent->{'start_time'} + $dt
504 3159 0 if (not %$pending) { }
0 0 elsif ($allexpired and $allow_aborting_of_expired) { }
515 0 0 $allexpired ? :
521 0 3159 unless (eval {
522 0 0 $@ ne '' ? :
524 0 0 if $eval_stat =~ /__alarm__ignore__\(.*\)/s
529 3159 0 wantarray ? :
553 0 0 defined $ent->{'timeout_initial'} && $now > $ent->{'start_time'} + $ent->{'timeout_initial'} ? :
556 0 0 unless defined $ent->{'finish_time'}
568 0 0 if ($cb)
570 0 0 !defined($ent->{'rulename'}) ? :
574 0 0 unless (eval {
577 0 0 if $@ =~ /__alarm__ignore__\(.*\)/s
582 0 0 unless $cb_count
587 0 96 if $foundcnt > 0
614 0 13 unless defined $timestamp
616 0 13 unless (defined $key)
618 0 0 if ($id eq $pending->{$id}{'id'}) { }
622 0 0 if ($id eq $pending->{$tkey}{'id'})
627 0 13 if (not defined $key) { }
632 0 13 if (not defined $ent_id) { }
0 13 elsif ($id ne $ent_id) { }