Branch Coverage

lib/MIME/AltWords.pm
Criterion Covered Total %
branch 101 126 80.1


line true false branch
133 79 71 if ($S =~ /\A(?:iso-?(?:8859-?)?|8859-?)(\d+)\Z(?!\n)/i) { }
45 26 elsif ($S =~ /\AUTF-?8\Z(?!\n)/i) { }
3 23 elsif ($S =~ /\A(?:US-)ASCII\Z(?!\n)/i) { }
144 29 68 if ($opts->{'Encoding'} eq 'B') { }
68 0 elsif ($opts->{'Encoding'} eq 'Q') { }
150 109 197 defined $1 ? :
173 29 61 if $opts->{'Encoding'} eq 'B'
177 84 6 if ($opts->{'Shorts'}) { }
182 85 6 if $J > length $src
183 25 66 if ($opts->{'Charset'} eq 'UTF-8')
184 0 25 if (substr($src, $J, 1) =~ tr/\200-\277//)
186 0 0 if $J > $I + 1 and substr($src, $J - 1, 1) =~ tr/\300-\377//
195 7 57 if ($opts->{'Encoding'} eq 'Q' and $addlen > $maxlen and $addlen > 3)
199 3 45 if (substr($dst, $K - 3, 1) eq '=') { }
217 0 0 defined $2 ? :
239 2603 363 $K == $I ? :
241 0 2878 if ($C eq "\n") { }
65 2813 elsif ($C eq ' ') { }
245 18 70 if ($K > $I and $J > $I + $maxlen)
250 74 14 if ($J + $maxlen >= length $S)
317 0 80 unless defined $S
323 41 39 unless defined $opts{'Raw'}
324 28 52 unless defined $opts{'Charset'}
325 0 80 unless defined $opts{'Charset'}
327 46 34 if ($opts{'Raw'})
333 8 71 defined $opts{'Encoding'} ? :
334 75 4 if $opts{'Encoding'} ne 'B'
335 23 56 if $opts{'Encoding'} eq 'Q' and $opts{'Charset'} eq 'UTF-8'
341 73 6 unless defined $opts{'Shorts'}
342 45 34 unless defined $opts{'Whole'}
343 79 0 unless defined $opts{'Space'}
344 79 0 unless defined $opts{'Split'}
345 61 18 unless defined $opts{'Keeptrailnl'}
347 18 61 if $opts{'Keeptrailnl'} and $S =~ s/(\n)\Z(?!\n)//
348 6 73 if (not $opts{'Shorts'}) { }
46 27 elsif ($opts{'Whole'}) { }
351 43 3 if ($S =~ /$MIME::AltWords::NONPRINT/o)
355 46 0 if $opts{'Split'}
365 41 0 unless defined $D
369 29 0 if ($I + $srclen != length $S and substr($src, -1) eq ' ' and $S =~ / |\Z(?!\n)|($MIME::AltWords::NONPRINT)/cog and not defined $1)
374 0 41 if 1 > length $src
382 12 15 if 0 < length $opts{'Space'} and length $S == $lastpos
383 27 0 if $opts{'Split'}
433 27 3 if $charset and !@L || $L[-1] ne $charset
435 5 18 if @L != 1
500 23 27 if wantarray
502 19 8 unless defined $opts{'Raw'}
508 16 11 if $opts{'Raw'} and not defined $opts{'Charset'}
511 34 21 $token->[1] ? :
512 42 13 if $opts{'Raw'}
555 3 45 if $charset eq 'UTF-8' or $charset eq 'UTF8'
557 9 36 $@ ? :
570 39 9 if &is_encodable($_[0], $charset)
581 3 3 $_[1] eq 'addresses' ? :
594 3 3 $_[1] eq 'addresses' ? :
598 5 8 if (&canonical_charset($charset2) eq $charset)
602 1 5 unless defined $best_charset
604 5 1 $charset eq $best_charset ? :
614 0 1 if ($main::DEBUG)
625 0 0 if (open my $log, '>> /tmp/em.log')
641 0 0 if (wantarray) { }
644 0 0 if (open my $log, '>> /tmp/em.log')
656 0 0 if (open my $log, '>> /tmp/em.log')