Branch Coverage

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


line true false branch
22 44 5 @_ && ref $_[0] ? :
24 11 38 unless local $_ = shift()
28 0 38 if /\=\?.*?\?\=/
36 0 38 if /^[\d ]+$/
48 9 29 unless (/[A-Z]/ and /[a-z]/)
73 18 419 if (s/^\s*\(/(/)
81 18 5 unless --$depth
82 1 4 if s/^(([^\(\)\\]|\\.)+)//
86 0 18 if $depth
95 409 0 if (s/^("(?:[^"\\]+|\\.)*")\s*// or s/^(\[(?:[^\]\\]+|\\.)*\])\s*// or s/^([^\s()<>\@,;:\\".[\]]+)\s*// or s/^([()<>\@,;:\\".[\]])\s*//)
116 21 256 if $c eq ',' or $c eq ';' or $c eq '<'
126 0 32 unless @$phrase or @$comment or @$address
158 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] =~ /^[.\@:;]$/) { }
160 20 0 if $depth
162 0 48 if $depth
164 48 0 if defined $o
173 0 3 if $depth
175 3 0 if defined $o
191 114 0 unless @_
194 0 0 if @_
207 18 26 if (defined $phrase and length $phrase) { }
26 0 elsif (defined $email and length $email) { }
208 9 0 $phrase =~ /(?
9 9 $phrase =~ /^(?:\s*$atext\s*)+$/o ? :
213 18 0 if defined $email and length $email
220 16 28 if (defined $comment and $comment =~ /\S/)
225 16 28 if defined $comment and length $comment
228 44 0 if @addr
242 26 18 unless defined $phrase and length $phrase
248 4 40 if ($name eq '' and $addr =~ /([^\%\.\@_]+([\._][^\%\.\@_]+)+)[\@\%]/)
253 1 43 if ($name eq '' and $addr =~ m[/g=]i)
259 38 6 length $name ? :
266 0 0 $i >= 0 ? :
273 0 0 $i >= 0 ? :