Branch Coverage

lib/Sisimai/Address.pm
Criterion Covered Total %
branch 150 186 80.6


line true false branch
28 12 2 $argv0 ? :
38 3 10637 if length $email < 5
44 1 10636 if $width > 254
45 18 10618 if $lasta < 1 or $lasta > 64
46 0 10618 if $width - $lasta > 253
48 10600 18 unless ($quote)
50 20 10580 if index($email, "\@") != $lasta
51 0 10580 if index($email, " ") > 0
59 106771 148484 if ($j < $lasta) { }
61 0 106771 if $p < 32 or $p > 126
62 10598 96173 if $j == 0
64 264 95909 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 95909 if $e eq "," or $e eq "\@" or $e eq ":" or $e eq ";" or $e eq "("
82 0 95909 if $e eq ")" or $e eq "<" or $e eq ">" or $e eq "[" or $e eq "]"
86 10598 137886 if $p == 64
87 0 137886 if $p < 45
88 0 137886 if $p == 47
89 0 137886 if $p == 92
90 0 137886 if $p > 122
92 137816 70 if ($ipv46 == 0) { }
94 15 137801 if $p > 57 and $p < 64
95 0 137801 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 10579 if $ipv46
115 18 10600 if index($argv0, "\"") == 0 and index($argv0, "\"\@") > 1
132 79 1521 if grep {index($email, $_) != -1;} @$postmaster
133 37 1484 if $email eq "mailer-daemon" or $email eq "postmaster"
143 80 7344 if ref $argvs ne "HASH"
154 0 7344 unless exists $argvs->{'address'}
155 42 7302 unless $argvs->{'address'}
161 7280 22 if ($point > 0) { }
168 7279 1 unless ($email)
171 11 7268 if $email
174 12 7268 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 14742 254244 if ($delimiters->{$e}) { }
243 640 14102 if ($e eq ",")
245 2 638 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 637 $p ? :
271 6270 7832 if ($e eq "<")
273 5 6265 if ($v->{'address'}) { }
274 0 5 $p ? :
285 5620 2212 if ($e eq ">")
287 5594 26 if ($readcursor & $indicators->{'email-address'}) { }
295 0 26 $p ? :
300 125 2087 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 1956 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 1956 0 if ($e eq "\"")
365 10 1946 if ($p) { }
372 1946 0 unless $readcursor & $indicators->{'quoted-string'}
373 0 0 if substr($v->{'name'}, -2, 2) eq "\\\""
381 145724 108520 $p ? :
386 6263 3417 if ($v->{'address'}) { }
392 3242 175 if ($v->{'name'} =~ /$validemail/u) { }
4 171 elsif (__PACKAGE__->is_mailerdaemon($v->{'name'})) { }
401 3246 171 if ($v->{'address'})
403 0 3246 if ("Sisimai::String"->aligned(\$v->{'address'}, ["(", ")"]))
417 0 9511 if $e->{'address'} =~ /[^\x20-\x7e]/u
418 29 9482 if (index($e->{'address'}, "\@") == -1)
420 5 24 unless __PACKAGE__->is_mailerdaemon($e->{'address'})
426 9498 8 unless index($e->{'address'}, "\@[") > 1
428 9485 21 if (index($e->{'address'}, "\"\@") == -1)
430 25 9460 if substr($e->{'address'}, 0, 1) eq "\""
431 21 9464 if substr($e->{'address'}, -1, 1) eq "\""
434 5797 3709 if ($addrs) { }
442 3648 61 unless $e->{'comment'} =~ /\A[(].+[)]\z/u
443 2798 911 unless $e->{'name'} =~ /\A["].+["]\z/u
444 3701 8 unless $e->{'name'} =~ /\A["].+["][\@]/u
445 914 2795 if substr($e->{'name'}, -1, 1) eq "\""
450 176 9504 unless scalar @$addrtables
461 171 5752 unless scalar @$addrs
474 7279 2 unless $local =~ /\A[-_\w]+?[+](\w[-._\w]+\w)[=](\w[-.\w]+\w)\z/u
476 2 0 if __PACKAGE__->is_emailaddress($verp0)
484 20 7260 unless __PACKAGE__->is_emailaddress($email)
488 7248 12 unless $local[0] =~ /\A([-_\w]+?)[+].+\z/u