Branch Coverage

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


line true false branch
136 0 8 unless defined $$self{'text'}
189 2 4 if defined $$self{'expanded'}
194 0 4 unless defined $text
196 0 4 unless $text =~ /%/
199 1 3 @context ? :
210 9 0 if ($key eq '{') { }
0 0 elsif ($key eq '-') { }
0 0 elsif ($key eq '_') { }
0 0 elsif ($key eq '%') { }
211 9 0 if ($text =~ m[ \G (\w|_\p{IsAlpha}+) ([0-9]+)? (r)? ([.\-+,/_=]*)? } ]cgx) { }
220 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') { }
234 0 3 if 'Mail::SPF::Util'->ipv6_address_is_ipv4_mapped($ip_address)
237 3 0 if ($ip_address_version == 4) { }
0 0 elsif ($ip_address_version == 6) { }
261 3 0 if ($ip_address_version == 4) { }
0 0 elsif ($ip_address_version == 6) { }
277 0 0 unless $$self{'is_explanation'}
281 0 0 if 'Mail::SPF::Util'->ipv6_address_is_ipv4_mapped($ip_address)
286 0 0 unless $$self{'is_explanation'}
292 0 0 unless $$self{'is_explanation'}
295 0 0 $^O ne 'MacOS' ? :
307 6 3 if (defined $rh_parts or defined $reverse)
310 3 3 if defined $reverse
313 3 3 if (defined $rh_parts and $rh_parts > 0)
314 3 0 @list >= $rh_parts ? :
316 0 6 if (defined $rh_parts and $rh_parts == 0)
324 0 9 if $do_percent_encode
357 1 2 @context ? :
383 2 2 $self->_is_valid_context(0, $$self{'server'}, $$self{'request'}) ? :
394 3 6 unless (UNIVERSAL::isa($server, 'Mail::SPF::Server'))
395 1 2 if $require
398 0 6 unless (UNIVERSAL::isa($request, 'Mail::SPF::Request'))
399 0 0 if $require