Branch Coverage

blib/lib/ShiftJIS/String.pm
Criterion Covered Total %
branch 281 316 88.9


line true false branch
43 7 16 if CORE::length $str
71 81 16 @_ == 3 ? :
72 11 86 if ($sub eq '')
73 4 1 $len <= $pos ? :
6 5 $pos <= 0 ? :
75 13 73 if $len < $pos
78 230 0 $str =~ s/^$Char//o ? :
80 100116 0 $str =~ s/^$Char//o ? :
82 58 15 CORE::length $str ? :
92 77 15 @_ == 3 ? :
93 11 81 if ($sub eq '')
94 5 1 $len <= $pos ? :
5 6 $pos <= 0 ? :
96 23 58 if $pos < 0
101 5170 95197 if CORE::substr($str, 0, $sublen) eq $sub
102 100367 0 $str =~ s/^$Char//o ? :
116 15 50045 unless exists $lst{$1}
131 4 50013 if exists $lst{$1}
147 46 100218 if exists $lst{$1} and not $found
151 12 11 $found ? :
164 4 50055 if not exists $lst{$1} and $found
168 8 2 !$found ? :
176 8 36 unless defined $lst
181 36 100176 $c ? :
22 100190 if $c ? exists $lst{$1} : !exists($lst{$1})
192 8 36 unless defined $lst
198 70 50237 $c ? :
199 52 50255 if $curfound and not $prefound
203 22 22 $prefound ? :
222 393 865 ref $arg ? :
225 46 1212 if $slen < $off
226 50 1208 if (@_ == 2) { }
228 4 1204 if $off + $slen < 0 and $len + $slen < 0
229 5 1203 if 0 <= $len and $off + $len + $slen < 0
231 55 1203 if ($except)
232 0 55 if (@_ > 3) { }
236 575 628 $off < 0 ? :
237 526 677 $len < 0 ? :
238 37 1166 if $ini < 0
239 294 909 if $ini > $fin
240 0 1203 if $slen < $ini
241 315 888 if $slen < $fin
247 64381 23418 if ($cnt < $ini) { }
22646 772 elsif ($cnt < $fin) { }
252 357 846 if (@_ > 3)
256 393 810 ref $arg ? :
267 0 0 wantarray ? :
271 0 619 defined $_[2] && $_[2] =~ /o/ ? :
292 1 906 if (ref $fr) { }
294 0 1 defined $re ? :
298 704 202 unless $R
299 204 702 defined $re ? :
302 1 906 if (ref $to) { }
304 0 1 defined $tore ? :
308 704 202 unless $R
309 3 903 defined $tore ? :
319 844 27050 if exists $hash{$fr[$i]}
320 93 335 $d ? :
25524 428 defined $to[$i] ? :
212 886 $d && !$c ? :
25952 1098 @to ? :
330 243 1943 ref $str ? :
331 38 284030 $h ? :
284068 267676 exists $hash{$1} ? :
335 5 1 wantarray ? :
241 1939 ref $str ? :
6 2180 $h ? :
344 74 0 ref $str ? :
345 10 1896 $h ? :
1586 320 ($h ? ++$cnt{$1} : ++$cnt, @to) ? :
421 1906 exists $hash{$1} ? :
348 2 0 wantarray ? :
72 0 ref $str ? :
2 72 $h ? :
357 146 1 ref $str ? :
358 4 3801 $h ? :
858 3805 exists $hash{$1} ? :
360 1 0 wantarray ? :
145 1 ref $str ? :
1 146 $h ? :
370 146 1 ref $str ? :
371 0 841 $h ? :
174 667 $hash{$1} eq '' || $hash{$1} eq $pre ? :
841 3818 exists $hash{$1} ? :
376 0 0 wantarray ? :
146 1 ref $str ? :
0 147 $h ? :
387 72 1 ref $str ? :
388 0 1904 $h ? :
1588 316 @to ? :
1265 639 $tmp eq $pre ? :
415 1904 exists $hash{$1} ? :
395 0 0 wantarray ? :
72 1 ref $str ? :
0 73 $h ? :
400 73 0 $modes == 5 ? :
147 73 $modes == 4 || $modes == 6 ? :
147 220 $modes == 3 || $modes == 7 ? :
74 367 $modes == 1 ? :
466 441 $modes == 0 || $modes == 2 ? :
405 2 2 $c > 255 ? :
0 4 $c < 32 || $c == 127 ? :
0 4 $c == 0 ? :
410 120 308 CORE::length $_[0] > 1 ? :
416 14 200 if ($fr > $to) { }
417 12 2 if ($rev) { }
423 152 60 if ($fr <= 127)
424 0 152 $fr < 0 ? :
425 4 148 $to > 127 ? :
428 155 57 if ($fr <= 223)
429 152 3 $fr < 161 ? :
430 4 151 $to > 223 ? :
433 155 57 $fr < 33088 ? :
434 0 212 $to > 64764 ? :
435 61 151 if ($ini <= $fin)
438 0 61 if $ini_t < 64
439 0 61 if $fin_t > 252
440 55 6 if ($ini_f == $fin_f) { }
443 13 2807 if $i == 127
449 2 688 if $i == 127
453 128 152 if 160 <= $i and $i <= 223
459 4 658 if $i == 127
464 12 200 $rev ? :
477 214 3991 if ($range) { }
478 0 214 if ($s eq '\\-') { }
0 214 elsif ($s eq '\\\\') { }
481 214 0 @retv ? :
486 219 3772 if ($s eq '-') { }
8 3764 elsif ($s eq '\\-') { }
0 3764 elsif ($s eq '\\\\') { }
492 5 1449 if $range
493 1244 207 @retv ? :
3 1451 wantarray ? :
502 5 12 ref $str ? :
503 5 12 ref $str ? :
504 5 12 ref $str ? :
586 51 51 wantarray ? :
102 153 if $str eq ''
589 34 119 if (not defined $strpat) { }
590 12 22 if ($lim <= 0)
596 4 115 if ($strpat eq '' and $lim <= 0)
598 1 1 $lim < 0 ? :
2 2 wantarray ? :
604 4 4 wantarray ? :
8 129 if $lim == 1
607 91 38 CORE::length $pat ? :
609 91 38 if (CORE::length $pat) { }
611 228 418 if ($str =~ s/^$pat//) { }
614 0 418 unless $str =~ s/^($Char)//o
620 0 418 unless $str =~ s/^($Char)//o
624 69 60 if $str ne ''
625 31 98 if ($lim == 0)
636 90322 1664 CORE::length $1 > 1 ? :
640 3 11488 $_[0] eq $_[1] ? :
643 2 5 $_[0] eq $_[1] ? :
644 2 11473 $_[0] eq $_[1] ? :
645 2 4 $_[0] eq $_[1] ? :
646 2 2 $_[0] eq $_[1] ? :