Branch Coverage

blib/lib/Format/CN.pm
Criterion Covered Total %
branch 20 34 58.8


line true false branch
16 4 0 if ($args{'output'}) { }
17 0 4 unless open $out, ">:encoding($en)", $args{'output'}
22 3 1 if ($args{'content'}) { }
1 0 elsif ($args{'file'}) { }
23 3 0 if (not $args{'encoding'}) { }
24 0 3 if (is_utf8 $args{'encoding'}) { }
25 0 0 unless open $in, '<', \$args{'content'}
27 0 3 unless open $in, '<:encoding(utf8)', \$args{'content'}
30 0 0 unless open $in, "<:encoding($args{'encoding'})", \$args{'content'}
36 0 1 unless open $in, "<:encoding($args{'encoding'})", $args{'file'}
47 19 46 if ($c =~ /\p{han}/) { }
10 36 elsif ($c =~ /\p{p}/) { }
1 35 elsif ($c =~ /\s/s) { }
50 0 19 if $ENV{'DEBUG_MATCH'}
54 0 10 if $ENV{'DEBUG_MATCH'}
60 0 35 if $ENV{'DEBUG_MATCH'}
62 8 42 if defined $p_is_han and not $n_is_others and not $n_is_pun and $n_is_han ^ $p_is_han and not $p_is_pun