Branch Coverage

blib/lib/Mail/SpamAssassin/RegistryBoundaries.pm
Criterion Covered Total %
branch 42 54 77.7


line true false branch
54 90 0 if ($self->{'conf'}{'valid_tlds'} and %{$self->{'conf'}{'valid_tlds'};}) { }
61 90 0 if (eval { do { $self->{'valid_tlds_re'} = qr/$tlds/i; 1 } }) { }
73 0 0 unless $self->{'main'}{'ignore_site_cf_files'}
110 424 0 if (defined $domain and $domain ne '')
123 21 657 if (@domparts == 4) { }
227 430 elsif (@domparts == 3) { }
419 11 elsif (@domparts == 2) { }
124 0 0 if ($domparts[3] eq 'us' and $domparts[0] eq 'pvt' && $domparts[1] eq 'k12' || $domparts[0] =~ /^c[io]$/)
131 0 0 if $US_STATES{$domparts[2]}
139 3 224 if ($domparts[2] eq 'us') { }
140 0 3 if $US_STATES{$domparts[1]}
144 4 220 if $self->{'conf'}{'three_level_domains'}{$temp}
150 15 404 if $self->{'conf'}{'two_level_domains'}{$temp}
160 423 1 if @hostname
205 0 475 unless defined $dom
208 0 475 if $dom =~ /\s/
211 2 473 unless $dom =~ /\.([^.]+)$/
212 27 446 unless $self->{'conf'}{'valid_tlds'}{lc $1}
225 4 586 if $uri =~ /^(?:javascript|cid|file):/
227 38 548 if ($uri =~ s/^mailto://) { }
232 2 36 if $uri =~ /\@.*?\@/
233 3 33 unless $uri =~ s/.*@//
246 1 580 if $uri =~ /\%(?:2[1-9a-f]|[3-6][0-9a-f]|7[0-9a-e])/
252 528 52 unless ($host =~ /^$IP_ADDRESS$/)
254 87 441 unless is_fqdn_valid($host)
256 26 415 unless $self->is_domain_valid($host)
262 22 445 !wantarray ? :