Branch Coverage

blib/lib/Encode/Mapper.pm
Criterion Covered Total %
branch 85 186 45.7


line true false branch
28 11 4 if @_
34 0 1 unless $option{'silent'}
40 0 1833 unless (defined $_[0] and $_[0] ne '')
44 0 1833 unless (defined $_[1])
49 1551 282 if (UNIVERSAL::isa($_[1], 'ARRAY')) { }
0 560 elsif (ref \$_[1] ne 'SCALAR' and not UNIVERSAL::isa($_[1], 'CODE')) { }
50 0 1551 unless (defined $_[1][0])
54 0 1551 unless (ref \$_[1][0] eq 'SCALAR' or UNIVERSAL::isa($_[1][0], 'CODE'))
58 0 1551 unless (defined $_[1][1] and length $_[1][1] < length $_[0])
76 12 6 if $caller eq 'Encode::Mapper'
77 7 11 exists $options{$caller} ? :
82 31 12 if ($opt =~ /^\:/) { }
83 11 20 if $opt eq ':others' and $opt{'others'} = sub { shift(); }
84 11 9 if $opt eq ':silent' and $opt{'silent'} = 1
85 9 0 if $opt eq ':join'
94 15 3 exists $opt{'silent'} ? :
96 1 17 if (defined $opt{'complement'} and UNIVERSAL::isa($opt{'complement'}, 'ARRAY'))
102 3 15 if (defined $opt{'override'} and UNIVERSAL::isa($opt{'override'}, 'ARRAY'))
108 0 18 if (defined $opt{'others'} and not $option{'silent'})
109 0 0 if (UNIVERSAL::isa($opt{'others'}, 'CODE')) { }
118 1 17 unless defined $cls
138 4 1 exists $options{caller 0} ? :
141 1 4 if (UNIVERSAL::isa($_[0], 'ARRAY')) { }
0 4 elsif (UNIVERSAL::isa($_[0], 'HASH')) { }
151 1 4 if (defined $option{'complement'})
157 1 1 unless defined $tree[$q]{$token}
161 1 1 unless defined $tree[$q]
163 1 1 if defined $bell[$q]
171 0 280 unless verify_rule $_[$i], $_[$i + 1]
176 319 29 unless defined $tree[$q]{$token}
180 275 5 unless defined $tree[$q]
182 0 280 if $redef{$q}++
187 0 5 if (defined $option{'override'})
193 0 0 unless defined $tree[$q]{$token}
197 0 0 unless defined $tree[$q]
199 0 0 if $redef{$q}++
206 1012 268 unless (defined $tree[0]{$token})
207 506 506 if (not defined $option{'others'}) { }
218 774 506 unless ($q == 0)
219 514 260 unless (defined $bell[$q])
220 4 510 if (not defined $option{'others'}) { }
510 0 elsif (UNIVERSAL::isa($option{'others'}, 'CODE')) { }
244 20 32 if (defined $bell[$t]) { }
247 12 8 if (UNIVERSAL::isa($bell[$t][0], 'ARRAY'))
275 778 48 unless keys %{$tree[$q];}
280 8 818 if (grep {UNIVERSAL::isa($_, 'CODE');} @{$bell[$q];}) { }
0 818 elsif (defined $option{'join'}) { }
288 806 20 if (@{$bell[$q];} == 1) { }
292 12 8 if @{$bell[$q];} == 0
316 1 4 if ($$obj{'no_list'}) { }
332 4 24 ref $$obj{'bell'}[$q] eq 'ARRAY' ? :
350 5 0 unless defined $q
352 1 4 if ($$obj{'no_list'}) { }
361 2 4 ref $$obj{'bell'}[$q] eq 'ARRAY' ? :
366 0 5 defined $r ? :
390 0 0 $q == 0 ? :
399 0 0 unless defined $ref
415 0 0 if ($$obj{'no_list'}) { }
423 0 0 if (defined $2) { }
428 0 0 unless $1
431 0 0 $$obj{'bell'}[$q] eq '' ? :
434 0 0 if $q == 0
437 0 0 unless $$obj{'skip'}[$q] == 0
448 0 0 if (defined $2) { }
453 0 0 unless $1
456 0 0 ref $$obj{'bell'}[$q] eq 'ARRAY' ? :
459 0 0 if $q == 0
462 0 0 unless $$obj{'skip'}[$q] == 0
469 0 0 if (defined $ref)
470 0 0 if ref $ref ne 'GLOB'
471 0 0 defined $$return{$_} ? :
483 0 0 exists $options{caller 0} ? :
488 0 0 unless (&Encode::is_utf8($text))
492 0 0 if ($enc)
493 0 0 unless (&Encode::resolve_alias($enc))
501 0 0 if defined $_
0 0 if (not UNIVERSAL::isa($encoder, 'ARRAY') or grep {not $_->isa($cls) if defined $_;} @{$encoder;})
507 0 0 unless defined $mapper
509 0 0 defined $option{'join'} ? :
0 0 defined $$mapper{'join'} ? :
512 0 0 if ($$mapper{'no_code'}) { }
516 0 0 UNIVERSAL::isa($_, 'CODE') ? :
530 0 0 exists $options{caller 0} ? :
535 0 0 unless $enc
537 0 0 unless (&Encode::resolve_alias($enc))
542 0 0 if defined $_
0 0 if (not UNIVERSAL::isa($decoder, 'ARRAY') or grep {not $_->isa($cls) if defined $_;} @{$decoder;})
548 0 0 unless defined $mapper
550 0 0 defined $option{'join'} ? :
0 0 defined $$mapper{'join'} ? :
553 0 0 if ($$mapper{'no_code'}) { }
557 0 0 UNIVERSAL::isa($_, 'CODE') ? :
563 0 0 &Encode::is_utf8($text) ? :