Branch Coverage

blib/lib/Mail/SPF/Request.pm
Criterion Covered Total %
branch 34 42 80.9


line true false branch
208 1 17 if ref $$self{'state'} eq 'HASH'
213 1 17 unless my $versions_for_scope = $self->versions_for_scope->{$$self{'scope'}}
217 9 8 if (not defined $$self{'versions'}) { }
222 2 6 if (not ref $$self{'versions'}) { }
1 5 elsif (ref $$self{'versions'} ne 'ARRAY') { }
238 1 6 if @unsupported_versions
251 1 5 unless @versions
257 1 13 unless defined $$self{'identity'}
259 0 13 unless length $$self{'identity'}
263 9 4 if ($$self{'scope'} eq 'mfrom' || $$self{'scope'} eq 'pra' and $$self{'identity'} =~ /^(.*)@(.*?)$/) { }
275 4 9 unless defined $$self{'localpart'} and length $$self{'localpart'}
279 2 11 if ($$self{'scope'} eq 'helo')
284 1 12 if grep(($$self{'scope'} eq $_), ('helo', 'mfrom', 'pra')) and not defined $$self{'ip_address'}
289 10 2 unless (UNIVERSAL::isa($$self{'ip_address'}, 'NetAddr::IP'))
290 0 10 unless my $ip_address = 'NetAddr::IP'->new($$self{'ip_address'})
296 1 11 if ('Mail::SPF::Util'->ipv6_address_is_ipv4_mapped($$self{'ip_address'})) { }
11 0 elsif ($$self{'ip_address'}->version == 4) { }
0 0 elsif ($$self{'ip_address'}->version == 6) { }
326 0 0 unless UNIVERSAL::isa($super_request, 'Mail::SPF::Request')
460 0 5 unless defined $field
462 2 3 if @value