Branch Coverage

blib/lib/MARC/Detrans/Rules.pm
Criterion Covered Total %
branch 31 32 96.8


line true false branch
51 104 361 exists $$self{'rules'}{$key} ? :
89 1115 2 exists $$self{'rules'}{$key} ? :
99 1128 385 if ($in =~ /\G\Q$from\E/)
101 22 1106 if ($position eq 'initial') { }
8 1098 elsif ($position eq 'medial') { }
4 1094 elsif ($position eq 'final') { }
102 9 13 unless isInitial($in, $pos)
105 4 4 if isInitial($in, $pos) or isFinal($in, $pos)
108 0 4 unless isFinal($in, $pos)
116 2 1115 unless (defined $foundRule)
126 77 1038 if ($foundRule->escape and $foundRule->escape ne $currentEscape)
134 73 7 if ($currentEscape)
169 6 24 if $position == 0
170 7 17 if substr($string, $position - 1, 1) =~ /\W/
176 6 6 if $position == length($string) - 1
177 2 4 if substr($string, $position + 1, 1) =~ /\W/