Branch Coverage

blib/lib/Email/IsEmail.pm
Criterion Covered Total %
branch 134 180 74.4


line true false branch
203 1 80 unless $email
208 30 50 if ($errorlevel < 0) { }
266 4 1 if ($element_len == 0) { }
268 3 1 $element_count == 0 ? :
280 2 10 if ($element_len == 0) { }
282 1 1 $element_count == 0 ? :
287 2 8 if ($end_or_die)
300 17 4 if ($element_len == 0) { }
303 16 1 $element_count == 0 ? :
320 0 0 if ($token eq "\r" and ++$i == $raw_length || substr($email, $i, 1) ne "\n")
326 3 2 if ($element_len == 0) { }
327 2 1 $element_count == 0 ? :
340 0 66 if (scalar @{$context_stack;} != 1)
344 1 65 if ($parsedata->{'0'} eq '') { }
1 64 elsif ($element_len == 0) { }
1 63 elsif (length $parsedata->{'0'} > 64) { }
1 62 elsif ($context_prior == 3 or $context_prior == 4) { }
392 2 501 if ($end_or_die) { }
410 1 500 if ($ord < 33 or $ord > 126 or $ord == 10 or index('()<>[]:;@\\,."', $token) != -1)
468 1 1 if ($element_len == 0) { }
472 1 0 $element_count == 0 ? :
484 2 45 if ($element_len == 0) { }
1 44 elsif ($hyphen_flag) { }
486 1 1 $element_count == 0 ? :
505 1 43 if ($element_len > 63)
518 16 0 if ($parsedata->{'1'} eq '') { }
535 0 0 if ($token eq "\r" and ++$i == $raw_length || substr($email, $i, 1) ne "\n")
542 1 2 if ($element_len == 0) { }
543 1 0 $element_count == 0 ? :
578 1 763 if ($end_or_die)
597 0 764 if ($ord < 33 or $ord > 126 or index('()<>[]:;@\\,."', $token) != -1) { }
5 759 elsif ($token eq '-') { }
1 758 elsif (not $ord > 47 && $ord < 58 || $ord > 64 && $ord < 91 || $ord > 96 && $ord < 123) { }
602 1 4 if ($element_len == 0)
634 12 1 if (_max($return_status) < 63) { }
688 5 7 if (@{$matchesIP;} = $addressliteral =~ /\b((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))$/)
690 3 2 if ($index > 0)
695 2 10 if ($index == 0) { }
1 9 elsif (substr($addressliteral, 0, 5) ne 'IPv6:') { }
708 4 5 if ($index == -1) { }
710 3 1 if ($groupCount != $max_groups)
715 1 4 if (-1 != index($IPv6, '::', $index + 1)) { }
719 1 3 if ($index == 0 or $index == length($IPv6) - 2)
723 1 3 if ($groupCount > $max_groups) { }
0 3 elsif ($groupCount == $max_groups) { }
733 1 8 if (substr($IPv6, 0, 1) eq ':' and substr($IPv6, 1, 1) ne ':') { }
1 7 elsif (substr($IPv6, -1) eq ':' and substr($IPv6, -2, 1) ne ':') { }
1 6 elsif (scalar grep({not /^[0-9A-Fa-f]{0,4}$/;} @{$matchesIP;}) != 0) { }
768 0 0 if ($token eq "\r" and ++$i == $raw_length || substr($email, $i, 1) ne "\n")
797 1 351 if ($ord > 127 or $ord == 0 or $token eq '[') { }
0 351 elsif ($ord < 33 or $ord == 127) { }
834 0 0 if ($token eq "\r" and ++$i == $raw_length || substr($email, $i, 1) ne "\n")
883 0 180 if ($ord > 127 or $ord == 0 or $ord == 10) { }
1 179 elsif ($ord < 32 or $ord == 127) { }
925 0 13 if ($ord > 127) { }
0 13 elsif ($ord < 31 and $ord != 9 or $ord == 127) { }
1005 0 0 if ($token eq "\r" and ++$i == $raw_length || substr($email, $i, 1) ne "\n")
1035 0 75 if ($ord > 127 or $ord == 0 or $ord == 10) { }
0 75 elsif ($ord < 32 or $ord == 127) { }
1062 0 7 if ($token_prior eq "\r")
1063 0 0 if ($token eq "\r")
1068 0 0 if (++$crlf_count > 1)
1075 0 0 if (++$i == $raw_length or substr($email, $i, 1) ne "\n")
1084 0 7 if ($token_prior eq "\r")
1122 17 2102 if (_max($return_status) > 127)
1128 63 17 if (_max($return_status) < 127)
1129 2 61 if ($context == 5) { }
1 60 elsif ($context == 6) { }
2 58 elsif ($context == 3) { }
2 56 elsif ($context == 2) { }
0 56 elsif ($token eq "\r") { }
2 54 elsif ($parsedata->{'1'} eq '') { }
1 53 elsif ($element_len == 0) { }
1 52 elsif ($hyphen_flag) { }
0 52 elsif (length $parsedata->{'1'} > 255) { }
1 51 elsif (length $parsedata->{'0'} . '@' . $parsedata->{'1'} > 254) { }
0 51 elsif ($element_len > 63) { }
1191 0 80 if ($checkDNS and _max($return_status) < 7)
1210 0 0 unless $INC{'Net/DNS.pm'}
1211 0 0 if ($INC{'Net/DNS.pm'})
1213 0 0 if ($element_count == 0)
1219 0 0 if (scalar @domains == 0)
1225 0 0 if (scalar @domains == 0)
1264 17 63 if (not $dns_checked and _max($return_status) < 7)
1265 4 13 if ($element_count == 0)
1269 0 17 if (&looks_like_number(substr($atomlist->{'1'}[$element_count], 0, 1)))
1277 67 13 if (scalar @{$return_status;} != 1)
1283 0 80 if ($final_status < $threshold)
1287 50 30 $diagnose ? :
1296 912 2418 if ($val > $res)