Branch Coverage

blib/lib/String/UnicodeUTF8.pm
Criterion Covered Total %
branch 34 50 68.0


line true false branch
12 2 20 if @_ == 1
18 2 18 if $_ eq 'import' or $_ eq '_pre_581_is_utf8_hack'
19 17 1 if defined &{$_;}
39 59 52 unless (is_unicode($string))
40 59 0 if (defined &utf8::decode) { }
48 33 26 unless (is_unicode($string))
51 33 0 if (defined &utf8::upgrade) { }
61 0 111 if ref $pre_573_is_utf8_hack
67 63 230 if (is_unicode($string))
68 63 0 if (defined &utf8::encode) { }
76 0 293 if ref $pre_573_is_utf8_hack
89 0 30 if ($is_uni and $] < 5.008001 and Module::Want::have_mod('Data::Dumper'))
95 0 0 unless $quote eq q[']
108 83 21 if ($n < 32 or $n > 126) { }
21 0 elsif ($quotemeta) { }
109 51 32 !$is_uni && $n < 255 ? :
136 27 112 $string =~ /\\x\{[0-9a-fA-f]+\}/ ? :
139 126 13 if $unquotemeta
140 27 112 if $is_uni
194 2 5 if &bytes::length($string) != length $string
197 5 0 if (Module::Want::have_mod('Encode')) { }
198 1 4 if Encode::is_utf8($string)
203 0 0 if (Module::Want::have_mod('B::Flags') and defined &B::svref_2object) { }
204 0 0 if B::svref_2object(\$string)->flagspv =~ /UTF.?8/i
211 0 0 if exists $$pre_573_is_utf8_hack{$string}