Branch Coverage

blib/lib/Encode/ISO2022.pm
Criterion Covered Total %
branch 78 188 41.4


line true false branch
35 0 1 unless $Name
37 0 1 unless $opts{'CCS'}
38 0 1 unless @CCS
42 0 10 if (ref $$ccs{'encoding'}) { }
10 0 elsif ($$ccs{'encoding'}) { }
47 0 10 unless $encoding
59 1 0 if $opts{'Alias'}
72 0 1 if (ref $chk eq 'CODE')
112 17152 14 if ($g_seq) { }
0 14 elsif ($ls) { }
113 0 17152 unless (defined $self->designate_dec($g_seq))
117 0 0 unless (defined $self->invoke_dec($ls))
121 0 17166 if ($errSeq)
122 0 0 if ($chk & $DIE_ON_ERR)
125 0 0 if ($chk & $WARN_ON_ERR)
128 0 0 if ($chk & $RETURN_ON_ERR)
133 0 0 if ($chk_sub) { }
0 0 elsif ($chk & $PERLQQ) { }
151 17173 0 if (defined $conv)
154 1076 16097 if ($conv =~ /[\r\n]/ and $$self{'LineInit'})
162 0 0 if ($chk & $DIE_ON_ERR)
165 0 0 if ($chk & $WARN_ON_ERR)
168 0 0 if ($chk & $RETURN_ON_ERR)
173 0 0 if ($errChar =~ /^[\x00-\x1F]/)
175 0 0 if (@ccs)
183 0 0 if ($chk_sub) { }
0 0 elsif ($chk & $PERLQQ) { }
195 1 0 unless $chk & $LEAVE_SRC
207 16 17157 if ($ss) { }
208 16 144 if $$_{'_designated_to'} and $$_{'ss'}
213 154413 17157 unless $$_{'_invoked_to'}
221 0 6267 $$ccs{'gr'} ? :
10906 6267 $$ccs{'range'} ? :
225 10906 6267 if ($range)
226 0 10906 if ($chunk =~ /^[^$range]/) { }
0 10906 elsif ($chunk =~ s/([^$range].*)$//s) { }
233 16 17157 if ($ss)
234 16 0 if ($bytes <= length $chunk)
240 0 17173 if ($$ccs{'gr'}) { }
248 0 17173 if ($range and $chunk =~ /^([$range]{1,$bytes})/)
250 0 0 if (not defined $errLen or $len < $errLen)
257 17173 0 if ($conv =~ /./so)
270 171520 0 if $$_{'g_seq'}
273 0 17152 unless $ccs
281 0 0 if $$_{'_designated_to'} and $$_{'ls'}
285 0 0 unless $ccs
300 0 1 if (ref $chk eq 'CODE')
311 17173 0 if (defined $conv)
314 1076 16097 if ($conv =~ /[\r\n]/ and $$self{'LineInit'})
321 0 0 if ($chk & $DIE_ON_ERR)
324 0 0 if ($chk & $WARN_ON_ERR)
327 0 0 if ($chk & $RETURN_ON_ERR)
333 0 0 if ($chk_sub) { }
0 0 elsif ($chk & $PERLQQ) { }
0 0 elsif ($chk & $XMLCREF) { }
0 0 elsif ($chk & $HTMLCREF) { }
335 0 0 unless &Encode::is_utf8($subChar)
347 0 0 if (defined $conv)
351 1 0 unless $chk & $LEAVE_SRC
353 1 0 if (length $str)
363 6935 56574 if $$ccs{'dec_only'}
369 5871 50703 if (defined $$ccs{'ss'}) { }
373 13 5858 if ($bytes < length $conv) { }
3 5855 elsif (length $conv == $bytes) { }
376 13 0 if (length $conv)
388 17173 39401 if (defined $conv and length $conv)
399 2154 1 if ($reset)
418 0 36480 unless $g
423 36480 0 if ($g_seq) { }
424 364800 0 if $$_{'g_seq'}
428 0 0 if not $$_{'g_seq'}
436 22 36458 unless grep {not $$_{'_designated_to'} && $$_{'_designated_to'} eq $g;} @ccs
440 2162 34296 unless $$self{'_state'}{$g}
447 36450 8 unless ($$ccs{'ls'} or $$ccs{'ss'})
448 0 36450 $$ccs{'gr'} ? :
457 0 72916 unless $invoked{$i}
36466 36450 unless @{[] unless $invoked{$i};}
459 2154 34296 unless $$self{'_state'}{$i}
471 0 17173 unless defined $str
473 0 17173 $$ccs{'gr'} ? :
475 0 17173 if ($i eq 'gr')
479 16 17157 if ($$ccs{'ss'}) { }
0 17157 elsif ($$ccs{'ls'}) { }
491 0 0 if ($g_seq) { }
492 0 0 $$_{'gr'} ? :
0 0 if $$_{'g_seq'} and $$_{'g_seq'} eq $g_seq and $$_{'ls'} and $$_{'ls'} eq $ls
498 0 0 $$_{'gr'} ? :
0 0 if not $$_{'g_seq'} and ($$_{'g'} || $$_{'g_init'}) eq $g and $$_{'ls'} and $$_{'ls'} eq $ls
507 0 0 unless grep {not $$_{'_invoked_to'} && $$_{'_invoked_to'} eq $i;} @ccs
510 0 0 unless $$self{'_state'}{$i}
537 0 0 if (ref $item eq 'HASH') { }
0 0 elsif (ref $item eq 'ARRAY') { }
0 0 elsif (ref $item and $item->can('renew')) { }
552 0 0 if $$self{'Name'} =~ /^x/i