Branch Coverage

blib/lib/Mail/Address.pm
Criterion Covered Total %
branch 59 80 73.7


line true false branch
26 44 5 @_ && ref $_[0] ? :
28 11 38 unless local $_ = shift()
32 0 38 if /\=\?.*?\?\=/
40 0 38 if /^[\d ]+$/
52 9 29 unless (/[A-Z]/ and /[a-z]/)
77 18 419 if (s/^\s*\(/(/)
85 18 5 unless --$depth
86 1 4 if s/^(([^\(\)\\]|\\.)+)//
90 0 18 if $depth
99 409 0 if (s/^("(?:[^"\\]+|\\.)*")\s*// or s/^(\[(?:[^\]\\]+|\\.)*\])\s*// or s/^([^\s()<>\@,;:\\".[\]]+)\s*// or s/^([()<>\@,;:\\".[\]])\s*//)
120 21 256 if $c eq ',' or $c eq ';' or $c eq '<'
130 0 32 unless @$phrase or @$comment or @$address
162 18 463 if (substr($_, 0, 1) eq '(') { }
20 443 elsif ($_ eq '<') { }
20 423 elsif ($_ eq '>') { }
48 375 elsif ($_ eq ',' or $_ eq ';') { }
137 238 elsif ($depth) { }
32 206 elsif ($next eq '<') { }
203 3 elsif (/^[.\@:;]$/ or not @address or $address[-1] =~ /^[.\@:;]$/) { }
164 20 0 if $depth
166 0 48 if $depth
168 48 0 if defined $o
177 0 3 if $depth
179 3 0 if defined $o
195 114 0 unless @_
198 0 0 if @_
211 18 26 if (defined $phrase and length $phrase) { }
26 0 elsif (defined $email and length $email) { }
212 9 0 $phrase =~ /(?
9 9 $phrase =~ /^(?:\s*$atext\s*)+$/o ? :
217 18 0 if defined $email and length $email
224 16 28 if (defined $comment and $comment =~ /\S/)
229 16 28 if defined $comment and length $comment
232 44 0 if @addr
246 26 18 unless defined $phrase and length $phrase
252 4 40 if ($name eq '' and $addr =~ /([^\%\.\@_]+([\._][^\%\.\@_]+)+)[\@\%]/)
257 1 43 if ($name eq '' and $addr =~ m[/g=]i)
263 38 6 length $name ? :
270 0 0 $i >= 0 ? :
277 0 0 $i >= 0 ? :