Branch Coverage

lib/Sisimai/Address.pm
Criterion Covered Total %
branch 149 186 80.1


line true false branch
28 12 2 $argv0 ? :
38 3 10567 if length $email < 5
44 1 10566 if $width > 254
45 18 10548 if $lasta < 1 or $lasta > 64
46 0 10548 if $width - $lasta > 253
48 10530 18 unless ($quote)
50 20 10510 if index($email, "\@") != $lasta
51 0 10510 if index($email, " ") > 0
59 106156 147524 if ($j < $lasta) { }
61 0 106156 if $p < 32 or $p > 126
62 10528 95628 if $j == 0
64 264 95364 if ($quote) { }
67 0 264 if (ord $jp == 92) { }
69 0 0 if $p != 92 and $p != 34
73 0 264 if $p == 34 and $j + 1 < $lasta
81 0 95364 if $e eq "," or $e eq "\@" or $e eq ":" or $e eq ";" or $e eq "("
82 0 95364 if $e eq ")" or $e eq "<" or $e eq ">" or $e eq "[" or $e eq "]"
86 10528 136996 if $p == 64
87 0 136996 if $p < 45
88 0 136996 if $p == 47
89 0 136996 if $p == 92
90 0 136996 if $p > 122
92 136926 70 if ($ipv46 == 0) { }
94 0 136926 if $p > 57 and $p < 64
95 0 136926 if $p > 90 and $p < 97
99 0 70 if $p > 59 and $p < 64
100 0 70 if $p > 93 and $p < 97
104 4 10524 if $ipv46
115 18 10530 if index($argv0, "\"") == 0 and index($argv0, "\"\@") > 1
132 79 1513 if grep {index($email, $_) != -1;} @$postmaster
133 37 1476 if $email eq "mailer-daemon" or $email eq "postmaster"
143 80 7304 if ref $argvs ne "HASH"
154 0 7304 unless exists $argvs->{'address'}
155 42 7262 unless $argvs->{'address'}
161 7240 22 if ($point > 0) { }
168 7239 1 unless ($email)
171 11 7228 if $email
174 12 7228 if (index($email, "\@") > 0)
176 11 1 if ($alias) { }
194 4 18 unless __PACKAGE__->is_mailerdaemon($argvs->{'address'})
195 0 18 if rindex($argvs->{'address'}, " ") != -1
241 14549 251687 if ($delimiters->{$e}) { }
243 629 13920 if ($e eq ",")
245 2 627 if (index($v->{'address'}, '<') == 0 and rindex($v->{'address'}, '@') != -1 and substr($v->{'address'}, -1, 1) eq '>') { }
249 0 2 if ($readcursor & $indicators->{'comment-block'}) { }
0 2 elsif ($readcursor & $indicators->{'quoted-string'}) { }
266 1 626 $p ? :
271 6190 7730 if ($e eq "<")
273 5 6185 if ($v->{'address'}) { }
274 0 5 $p ? :
285 5540 2190 if ($e eq ">")
287 5514 26 if ($readcursor & $indicators->{'email-address'}) { }
295 0 26 $p ? :
300 125 2065 if ($e eq "(")
302 2 123 if ($readcursor & $indicators->{'email-address'}) { }
0 123 elsif ($readcursor & $indicators->{'comment-block'}) { }
0 123 elsif ($readcursor & $indicators->{'quoted-string'}) { }
304 0 2 if (rindex($v->{'address'}, '"') != -1) { }
311 0 2 if substr($v->{'comment'}, -1, 1) eq ")"
317 0 0 if substr($v->{'comment'}, -1, 1) eq ")"
327 29 94 if substr($v->{'comment'}, -1, 1) eq ")"
334 131 1934 if ($e eq ")")
336 2 129 if ($readcursor & $indicators->{'email-address'}) { }
123 6 elsif ($readcursor & $indicators->{'comment-block'}) { }
338 0 2 if (rindex($v->{'address'}, '"') != -1) { }
363 1934 0 if ($e eq "\"")
365 10 1924 if ($p) { }
372 1924 0 unless $readcursor & $indicators->{'quoted-string'}
373 0 0 if substr($v->{'name'}, -2, 2) eq "\\\""
381 143819 107868 $p ? :
386 6183 3407 if ($v->{'address'}) { }
392 3232 175 if ($v->{'name'} =~ /$validemail/u) { }
4 171 elsif (__PACKAGE__->is_mailerdaemon($v->{'name'})) { }
401 3236 171 if ($v->{'address'})
403 0 3236 if ("Sisimai::String"->aligned(\$v->{'address'}, ["(", ")"]))
417 0 9421 if $e->{'address'} =~ /[^\x20-\x7e]/u
418 29 9392 if (index($e->{'address'}, "\@") == -1)
420 5 24 unless __PACKAGE__->is_mailerdaemon($e->{'address'})
426 9408 8 unless index($e->{'address'}, "\@[") > 1
428 9395 21 if (index($e->{'address'}, "\"\@") == -1)
430 25 9370 if substr($e->{'address'}, 0, 1) eq "\""
431 21 9374 if substr($e->{'address'}, -1, 1) eq "\""
434 5727 3689 if ($addrs) { }
442 3628 61 unless $e->{'comment'} =~ /\A[(].+[)]\z/u
443 2789 900 unless $e->{'name'} =~ /\A["].+["]\z/u
444 3681 8 unless $e->{'name'} =~ /\A["].+["][\@]/u
445 903 2786 if substr($e->{'name'}, -1, 1) eq "\""
450 176 9414 unless scalar @$addrtables
461 171 5682 unless scalar @$addrs
474 7239 2 unless $local =~ /\A[-_\w]+?[+](\w[-._\w]+\w)[=](\w[-.\w]+\w)\z/u
476 2 0 if __PACKAGE__->is_emailaddress($verp0)
484 5 7235 unless __PACKAGE__->is_emailaddress($email)
488 7223 12 unless $local[0] =~ /\A([-_\w]+?)[+].+\z/u