Branch Coverage

blib/lib/Mail/Message/Field.pm
Criterion Covered Total %
branch 85 110 77.2


line true false branch
29 0 2 unless $_[0]->toInt
32 4 6 $_[2] ? :
40 468 131 if ($class eq "Mail::Message::Field")
69 697 0 ref $_[0] ? :
84 88 5 unless @_
90 5 0 wantarray ? :
124 9 18 @_ ? :
127 37 2 /[aeiouyAEIOUY]/ ? :
39 3 unless $wf_lookup{lc $_}
140 198 467 unless $self->isStructured
158 28 27 @_ ? :
169 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) { }
192 4 27 unless $self->isStructured
196 2 25 if (@_)
199 2 0 if defined $comment and CORE::length $comment
204 14 11 $body =~ s/.*?\;\s*// ? :
214 250 109 unless (@_)
216 165 85 if ($body =~ /\b$attr\s*\=\s* ( "( (?> [^\\"]+|\\. )* )" | ([^";\s]*) )/xi)
228 0 109 unless (defined $value)
230 0 0 unless s/\b$attr\s*=\s*"(?>[^\\"]|\\.)*"//i
242 84 25 unless (s/\b$attr\s*=\s*"(?>[^\\"]|\\.){0,1000}"/$attr="$quoted"/i or s/\b$attr\s*=\s*[^;\s]*/$attr="$quoted"/i)
274 12 0 if $self->body =~ /^\s*(\d+)\s*$/
289 0 0 @_ == 1 ? :
16 0 @_ == 0 ? :
303 0 0 $zone eq '%z' ? :
308 0 0 $diff < 0 ? :
349 763 14 defined $_[1] ? :
351 0 777 if $name =~ /[^\041-\071\073-\176]/
358 28 749 if (ref $body) { }
702 47 elsif (not $body =~ s/\n+$/\n/g) { }
359 0 28 unless my $flat = $self->stringifyData($body)
370 0 47 if $body eq " \n"
383 14 14 ref $arg eq 'ARRAY' ? :
384 0 33 unless defined $obj
386 1 32 unless (ref $obj)
387 19 13 if ($obj->isa("Mail::Address"))
389 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')) { }
394 0 1 unless my(@roles) = $obj->roles
397 1 0 if $group
411 28 0 @addr ? :
420 7 343 if @_
431 0 0 @_ ? :
442 1 926 unless defined $line
445 3 924 unless CORE::length $line
449 55 924 @folded ? :
451 924 55 if CORE::length $line < $max
453 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
468 921 3 if CORE::length $line
469 5 919 wantarray ? :