Branch Coverage

blib/lib/Mail/Message/Field.pm
Criterion Covered Total %
branch 81 106 76.4


line true false branch
35 0 15 unless $_[0]->toInt
38 4 6 $_[2] ? :
45 895 183 if ($class eq __PACKAGE__)
66 9 18 @_ ? :
69 37 2 /[aeiouyAEIOUY]/ ? :
39 3 unless $wf_lookup{lc $_}
80 221 565 unless $self->isStructured
109 828 0 builtin::blessed($_[0]) ? :
125 88 5 unless @_
131 5 0 wantarray ? :
156 28 27 @_ ? :
167 4 468 if (CORE::length $r and substr($r, -1) eq '\\') { }
40 428 elsif ($s eq '"') { }
80 348 elsif ($s eq '(' and not $in_dquotes) { }
80 268 elsif ($s eq ')' and not $in_dquotes) { }
112 156 elsif ($open_paren) { }
182 4 37 unless $self->isStructured
186 2 35 if (@_)
189 2 0 if defined $comment and CORE::length $comment
194 14 21 $body =~ s/.*?\;\s*// ? :
208 324 153 unless @_
214 0 153 unless (defined $value)
216 0 0 unless s/\b$attr\s*=\s*"(?>[^\\"]|\\.)*"//i
227 127 26 unless (s/\b$attr\s*=\s*"(?>[^\\"]|\\.){0,1000}"/$attr="$quoted"/i or s/\b$attr\s*=\s*[^;\s]*/$attr="$quoted"/i)
250 25 0 if $self->body =~ /^\s*(\d+)\s*$/
263 0 0 @_ == 1 ? :
16 0 @_ == 0 ? :
275 0 0 $zone eq '%z' ? :
279 0 0 $diff < 0 ? :
307 1962 15 defined $_[1] ? :
309 0 1977 if $name =~ /[^\041-\071\073-\176]/
311 0 1977 if $name =~ /[^\041-\071\073-\176]/
317 28 1949 if (ref $body) { }
1144 805 elsif (not $body =~ s/\n+$/\n/g) { }
337 14 14 ref $arg eq 'ARRAY' ? :
338 0 33 unless defined $obj
340 1 32 unless (ref $obj)
341 19 13 if ($obj->isa("Mail::Address"))
343 7 6 if ($obj->isa('Mail::Identity') or $obj->isa('User::Identity')) { }
1 5 elsif ($obj->isa('User::Identity::Collection::Emails')) { }
5 0 elsif ($obj->isa('Mail::Message::Field')) { }
348 0 1 unless my(@roles) = $obj->roles
351 1 0 if $group
362 28 0 @addr ? :
369 7 361 if @_
378 0 0 @_ ? :
390 3 1440 unless CORE::length $line
393 0 1440 unless $lname <= $wrap - 5
398 55 1440 @folded ? :
400 1440 55 if CORE::length $line < $max
402 3 31 unless $line =~ s/^ ( .{$min,$max} # $max to 30 chars [;,] # followed at a ; or , )[ \t] # and then a WSP //x or $line =~ s/^ ( .{$min,$max} ) # $max to 30 chars [ \t] # followed by a WSP //x or $line =~ s/^ ( .{$max,}? ) # longer, but minimal chars [ \t] # followed by a WSP //x
417 1437 3 if CORE::length $line
418 5 1435 wantarray ? :