Branch Coverage

blib/lib/Mail/SPF/MacroString.pm
Criterion Covered Total %
branch 39 88 44.3


line true false branch
141 0 2 unless defined $self->{'text'}
194 2 4 if defined $self->{'expanded'}
198 0 4 unless defined $text
200 0 4 unless $text =~ /%/
203 1 3 @context ? :
214 9 0 if ($key eq '{') { }
0 0 elsif ($key eq '-') { }
0 0 elsif ($key eq '_') { }
0 0 elsif ($key eq '%') { }
215 9 0 if ($text =~ m[ \G (\w|_\p{IsAlpha}+) ([0-9]+)? (r)? ([.\-+,/_=]*)? } ]cgx) { }
224 0 9 if ($char eq 's') { }
0 9 elsif ($char eq 'l') { }
0 9 elsif ($char eq 'o') { }
3 6 elsif ($char eq 'd') { }
3 3 elsif ($char eq 'i') { }
0 3 elsif ($char eq 'p') { }
3 0 elsif ($char eq 'v') { }
0 0 elsif ($char eq 'h') { }
0 0 elsif ($char eq 'c') { }
0 0 elsif ($char eq 'r') { }
0 0 elsif ($char eq 't') { }
0 0 elsif ($char eq '_scope') { }
238 0 3 if "Mail::SPF::Util"->ipv6_address_is_ipv4_mapped($ip_address)
241 3 0 if ($ip_address_version == 4) { }
0 0 elsif ($ip_address_version == 6) { }
265 3 0 if ($ip_address_version == 4) { }
0 0 elsif ($ip_address_version == 6) { }
282 0 0 unless $self->{'is_explanation'}
285 0 0 if "Mail::SPF::Util"->ipv6_address_is_ipv4_mapped($ip_address)
291 0 0 unless $self->{'is_explanation'}
297 0 0 unless $self->{'is_explanation'}
299 0 0 $^O ne 'MacOS' ? :
311 6 3 if (defined $rh_parts or defined $reverse)
314 3 3 if defined $reverse
317 3 3 if (defined $rh_parts and $rh_parts > 0)
318 3 0 @list >= $rh_parts ? :
320 0 6 if (defined $rh_parts and $rh_parts == 0)
328 0 9 if $do_percent_encode
361 1 2 @context ? :
387 2 2 $self->_is_valid_context(0, $self->{'server'}, $self->{'request'}) ? :
398 3 6 unless (UNIVERSAL::isa($server, "Mail::SPF::Server"))
399 1 2 if $require
402 0 6 unless (UNIVERSAL::isa($request, "Mail::SPF::Request"))
403 0 0 if $require