Branch Coverage

blib/lib/Jcode.pm
Criterion Covered Total %
branch 89 126 70.6


line true false branch
36 0 1 unless my $type = ref $self
0 1 if $myname eq 'DESTROY'
0 1 unless my $e = find_encoding($myname)
0 1 if $Jcode::DEBUG
1 0 &Encode::is_utf8($str) ? :
130 0 &Encode::is_utf8($$r_str) ? :
4 8 if (length($line) + 22 + $target =~ /^(?:$RE{'EUC_0212'}|$RE{'EUC_C'})/o * 8 > $bpl)
0 0 if $Jcode::DEBUG
0 32 if (my $count = $iso_2022_jp =~ tr/\200-\377//d)
20 12 if (length($encoded) + length($line) > $bpl) { }
61 49 if $n > $result
0 8 if (not $wordstmp[$i] =~ /^[\x21-\x7E]+$/ || $wordstmp[$i + 1] =~ /^[\x21-\x7E]+$/) { }
0 12 if (length($1) + length($word) > $bpl) { }
12 8 if ($word =~ /^[\x21-\x7E]+$/) { }
0 20 if (length $1 == $bpl) { }
0 50 ref $str ? :
25 25 if defined $_[1]
50 0 unless (&Encode::is_utf8($$r_str) or $icode eq 'binary')
41 42 ref $_[0] ? :
0 83 if &Encode::is_utf8($$r_str)
0 83 unless defined $icode or $icode = getcode($r_str)
0 83 if $icode eq 'binary'
65 18 if $jname2e{$icode}
65 18 if $jname2e{$ocode}
0 0 $opt eq 'z' ? :
1 82 if (&Scalar::Util::readonly($$r_str)) { }
0 83 if ($opt) { }
0 3 unless @_
92 0 ref $arg ? :
2 90 if &Encode::is_utf8($$r_str)
7 0 if ($ucs2) { }
0 55 if $Jcode::DEBUG >= 3
7 0 $utf8 > $euc && $utf8 > $sjis ? :
6 7 $sjis > $euc && $sjis > $utf8 ? :
42 13 $euc > $sjis && $euc > $utf8 ? :
7 83 if ($$r_str =~ /$RE{'BIN'}/o) { }
21 62 elsif (not $$r_str =~ /[\e\x80-\xff]/o) { }
7 55 elsif ($$r_str =~ / $RE{'JIS_0208'}|$RE{'JIS_0212'}|$RE{'JIS_ASC'}|$RE{'JIS_KANA'} /ox) { }
0 90 wantarray ? :
0 12 &Encode::is_utf8($_) ? :
3 3 if (defined $kin and ref $kin eq 'ARRAY')
20 0 $ord <= 65439 ? :
60 20 $ord < 65377 ? :
27 80 $ord < 128 ? :
13 5 unless ($kinsoku{$char})
18 89 if ($len + $clen > $bpl)
0 6 unless defined $lines[$i]
19 0 &Encode::is_utf8($_) ? :
1 5 wantarray ? :
0 3 &Encode::is_utf8($_[0]) ? :
2 1 if ($@)
1 0 wantarray ? :
6 6 unless $trailing_crlf
0 184 unless defined $_[0]
0 5 &Encode::is_utf8($_[0]) ? :
0 5 &Encode::is_utf8($_[0]) ? :
2 3 if ($@)
8 198 ref $str ? :
148 58 if defined $_[1]
196 10 unless (&Encode::is_utf8($$r_str) or $icode eq 'binary')
0 10 &Encode::is_utf8($_[0]) ? :
0 10 &Encode::is_utf8($_[1]) ? :
1 9 if ($@)