Branch Coverage

blib/lib/Email/Simple/Header.pm
Criterion Covered Total %
branch 61 72 84.7


line true false branch
44 54 4 ref $head ? :
64 3 55 if ${$head;} =~ /[^\x00-\xFF]/u
73 49 394 if (/^\s+/u or not /^([^:]+):\s*(.*)/u) { }
76 1 48 unless @headers
79 46 2 $headers[-1][0] =~ /\S/u ? :
119 400 59 if (ref $$headers[$i + 1]) { }
196 87 78 ref $_[0] ? :
204 10 68 if (wantarray and not defined $index) { }
208 40 28 unless defined $index
210 56 12 $index >= 0 ? :
211 12 56 if $index < 0
213 158 95 unless lc $$headers[$_ * 2] eq $lc_field
214 51 44 if $index-- == 0
252 1 25 if $field =~ /[^\x00-\xFF]/u
253 1 25 if grep /[^\x00-\xFF]/u, @data
256 0 26 if ($Email::Simple::GROUCHY)
257 0 0 unless $field =~ /^[\x21-\x39\x3b-\x7e]+$/u
259 0 0 unless $field =~ /^[\w-]+$/u
269 2 24 if (@indices > @data) { }
15 9 elsif (@data > @indices) { }
285 2 24 wantarray ? :
305 0 9 unless defined $field
308 0 9 unless defined $value
356 5 4 if (defined $n)
357 1 4 if ($n < 0)
358 1 3 if ($n > $#indices)
365 9 5 if (ref $$headers[$i + 1])
400 0 59 unless exists $arg->{'at'}
402 0 59 unless exists $arg->{'indent'}
409 21 38 if ($line =~ /\n/u)
410 1 20 if ($line =~ s/\n([^\s\t])/\n$indent$1/gu) { }
413 15 5 unless $line =~ /\n$/u
418 0 39 unless $arg->{'at'} and $arg->{'at'} > 0
422 36 3 if length $line <= $limit
434 33 0 if ($line =~ s/^(.{0,$limit})(\s|\z)//u) { }
436 5 28 if length $line