Branch Coverage

lib/Unicode/MapUTF8.pm
Criterion Covered Total %
branch 70 164 42.6


line true false branch
34 0 3 if ($#_ == -1)
41 2 1 if ($#parms_list == 0 and ref $parms_list[0] eq 'HASH') { }
0 1 elsif ($#parms_list > 0 and $#parms_list % 2 == 1) { }
1 0 elsif ($#parms_list == 0) { }
64 1 1 unless (defined $charset)
65 1 0 if (exists $_Charset_Aliases->{$lc_alias})
71 0 1 unless (exists $_Charset_Names->{$lc_charset})
74 0 1 if (exists $_Charset_Names->{$lc_alias})
84 1 0 if ($#_ == -1 and wantarray)
90 0 0 unless (defined $charset)
94 0 0 if exists $_Charset_Names->{$lc_charset}
95 0 0 if exists $_Charset_Aliases->{$lc_charset}
104 0 17 if ($#parm_list > 0 and $#parm_list % 2 == 1) { }
17 0 elsif ($#parm_list == 0) { }
108 0 17 unless (ref $parms)
115 0 17 unless (exists $parms->{'-string'})
121 0 17 unless (defined $charset)
126 4 13 defined $alias_charset ? :
127 1 16 unless (defined $true_charset)
131 0 16 unless defined $string
134 8 8 if ($converter eq 'map8')
135 0 8 if ($converter eq 'unicode-map') { }
4 4 elsif ($converter eq 'string') { }
4 0 elsif ($converter eq 'jcode') { }
148 0 16 if ($#parm_list > 0 and $#parm_list % 2 == 1) { }
16 0 elsif ($#parm_list == 0) { }
152 0 16 unless (ref $parms)
159 0 16 unless (exists $parms->{'-string'})
166 0 16 unless (defined $charset)
171 4 12 defined $alias_charset ? :
172 0 16 unless (defined $true_charset)
176 0 16 unless defined $string
180 8 8 if ($converter eq 'map8') { }
0 8 elsif ($converter eq 'unicode-map') { }
4 4 elsif ($converter eq 'string') { }
4 0 elsif ($converter eq 'jcode') { }
200 0 0 unless (defined $target_charset)
206 0 0 unless (defined $target)
222 0 0 unless (defined $source_charset)
227 0 0 unless (defined $source)
245 0 8 unless (defined $target_charset)
250 0 8 unless (defined $u)
254 0 8 if defined $ordering and $ordering == 65534
258 0 8 unless (defined $target)
278 0 8 unless (defined $source)
283 0 8 unless (defined $ucs2_string)
303 0 4 if ($target_charset eq 'utf8') { }
4 0 elsif ($target_charset eq 'ucs2') { }
0 0 elsif ($target_charset eq 'ucs4') { }
0 0 elsif ($target_charset eq 'utf16') { }
0 0 elsif ($target_charset eq 'utf7') { }
308 0 4 if defined $ordering and $ordering == 65534
313 0 0 if defined $ordering and $ordering == 65534
318 0 0 if defined $ordering and $ordering == 65534
323 0 0 if defined $ordering and $ordering == 65534
343 0 4 if ($source_charset eq 'utf8') { }
4 0 elsif ($source_charset eq 'ucs2') { }
0 0 elsif ($source_charset eq 'ucs4') { }
0 0 elsif ($source_charset eq 'utf16') { }
0 0 elsif ($source_charset eq 'utf7') { }
347 0 4 unless (defined $u)
351 0 4 if defined $ordering and $ordering == 65534
355 0 0 unless (defined $u)
359 0 0 if defined $ordering and $ordering == 65534
363 0 0 unless (defined $u)
367 0 0 if defined $ordering and $ordering == 65534
371 0 0 unless (defined $u)
375 0 0 if defined $ordering and $ordering == 65534
398 0 4 if ($target_charset =~ /^iso[-_]2022[-_]jp$/) { }
0 4 elsif ($target_charset eq 'sjis') { }
4 0 elsif ($target_charset eq 'euc-jp') { }
0 0 elsif ($target_charset eq 'jis') { }
425 0 4 if ($source_charset =~ /^iso[-_]2022[-_]jp$/) { }
0 4 elsif ($source_charset =~ /^(s[-_]?jis|shift[-_]?jis)$/) { }
4 0 elsif ($source_charset eq 'euc-jp') { }
0 0 elsif ($source_charset eq 'jis') { }
477 10 505 if exists $_Charset_Names->{$lc_id}
490 46 44 if exists $_Charset_Names->{$lc_id}
511 1 0 if (opendir DIR, $Unicode::Map8::MAPS_DIR)
514 0 181 unless -f "$Unicode::Map8::MAPS_DIR/$f"
517 180 1 if 'Unicode::Map8'->new($f)
523 343 0 if (exists $set{$charset})