Branch Coverage

blib/lib/String/Tagged.pm
Criterion Covered Total %
branch 221 256 86.3


line true false branch
156 21 122 if is_string_tagged($str)
158 8 114 unless defined $str
259 30 27 builtin::blessed($_[0]) ? :
265 1 56 exists $opts{'only_tags'} ? :
269 0 57 exists $opts{'except_tags'} ? :
279 28 27 defined $opts{'len'} ? :
291 5 59 if $te < $start
292 3 56 if $ts >= $end
294 1 55 if $only and not $only->{$tn}
295 0 0 if $except and $except->{$tn}
298 2 53 if ($convert and my $c = $convert->{$tn}) { }
299 1 1 if (ref $c eq 'CODE') { }
312 8 47 $ts < 0 ? :
314 1 54 if $te <= 0
315 23 31 if $ts < 0 or $tf & 1
316 19 35 if $te > $len or $tf & 2
369 2 10 is_string_tagged($format) ? :
381 9 13 if ($str =~ /\G[^%]+/cgu) { }
1 12 elsif ($str =~ /\G%%/cgu) { }
10 2 elsif ($str =~ /\G%([-]?)(\d+|\*)?(?:\.(\d+|\*))?s/cgu) { }
2 0 elsif ($str =~ /\G%(.*?)([cduoxefgXEGbBpaAiDUOF])/cgu) { }
0 0 elsif ($str =~ /\G%(.*?)([a-zA-Z])/cgu) { }
393 1 9 if defined $width and $width eq "*"
394 1 9 if defined $precision and $precision eq "*"
397 0 10 unless (defined $arg)
402 2 8 if (defined $precision)
403 0 2 if (is_string_tagged($arg)) { }
413 4 6 defined $width ? :
414 1 9 if $padding < 0
418 8 2 unless $leftalign
422 2 8 if $leftalign
469 1 0 unless is_string_tagged($sep)
574 0 0 if @$tags < 2
581 0 0 if (_cmp_tags() <= 0)
603 84 78 if (@$tags == 0)
615 14 64 if (_cmp_tags() <= 0)
621 62 2 if (_cmp_tags() >= 0)
637 2 0 if ($cmp > 0) { }
0 0 elsif ($cmp < 0) { }
648 2 0 if ($range_start == $range_end)
654 0 2 unless defined $inspos
656 0 2 if $inspos < 0
657 0 2 if $inspos > @$tags
696 0 159 if (builtin::blessed($_[0])) { }
701 0 0 if $e->anchor_before
702 0 0 if $e->anchor_after
710 36 123 if ($start < 0)
715 37 122 if ($len == -1) { }
721 2 120 if $end > $strlen
738 5 4 if (builtin::blessed($_[0])) { }
750 5 4 if (my $t = $self->{'iterating'})
752 5 0 if ($start == $ts and $end == $te and $name eq $tn)
766 1 7 if $te <= $start
767 3 4 if $ts >= $end
769 0 4 if $tn ne $name
771 2 2 if ($keepends and $end < $te)
776 0 4 if ($tf & 4)
782 1 3 if ($keepends and $ts < $start) { }
866 1 2 if $tn ne $name
910 1 10 if $t2s > $te
911 0 10 unless $t2s <= $te
912 3 7 unless $t2n eq $tn
914 1 6 unless &$eqsub($tn, $tv, $t2v)
923 1 5 if $t2f & 2
927 1 5 if (local $b = $$tags[$i + 1] and _cmp_tags() > 0)
998 1 51 exists $opts{'start'} ? :
1002 0 51 exists $opts{'len'} ? :
1 51 exists $opts{'end'} ? :
1004 1 51 exists $opts{'only'} ? :
1007 1 51 exists $opts{'except'} ? :
1016 1 75 if $te < $start
1017 1 74 if $ts >= $end
1019 2 72 if $only and not $only->{$tn}
1020 1 2 if $except and $except->{$tn}
1029 5 66 if ($t->[4] & 8)
1095 2 34 exists $opts{'start'} ? :
1099 0 34 exists $opts{'len'} ? :
2 34 exists $opts{'end'} ? :
1101 1 35 exists $opts{'only'} ? :
1104 1 35 exists $opts{'except'} ? :
1115 2 76 if $te < $start
1116 2 74 if $ts > $end
1118 2 72 if $only and not $only->{$tn}
1119 1 2 if $except and $except->{$tn}
1129 14 28 if $e < $rangeend
1130 1 41 if $tagends{$n} and $tagends{$n} < $e
1153 21 53 if $e < $rangeend
1154 1 73 if $tagends{$n} and $tagends{$n} < $e
1167 1 2 if $_->[0] == $pos
1 35 if (my(@zerolen) = grep({$_->[1] == $pos if $_->[0] == $pos;} @active))
1279 3 11 if $ts > $pos
1280 1 10 if $te <= $pos
1309 4 11 if $ts > $pos
1310 3 8 if $te <= $pos
1312 6 2 if $tn eq $name
1341 3 16 if $ts > $pos
1342 1 15 if $te <= $pos
1344 3 12 unless $tn eq $name
1351 12 1 if (defined $start) { }
1383 3 3 unless $tn eq $name
1385 1 2 if ($ts <= $pos and $te > $pos)
1389 1 1 if ($ts > $pos)
1444 0 57 if $start > $limit
1445 0 57 if $len > $limit - $start
1465 12 29 if $ts >= $start and not $tf & 1
1474 15 14 if ($te > $oldend or $te == $oldend and $tf & 2) { }
1 13 elsif ($te > $start) { }
1477 4 11 if ($tf & 2 and $new_is_st)
1485 0 11 if ($t->[0] == $t->[1])
1502 10 3 if $ts >= $oldend
1508 2 1 if ($te <= $oldend) { }
1529 11 1 unless $tf & 1
1538 6 1 if _cmp_tags() <= 0
1546 22 35 if ($new_is_st)
1552 0 21 $atstart && $e->anchor_before ? :
5 16 $atend && $e->anchor_after ? :
1609 19 49 if is_string_tagged($new)
1623 12 47 if $t->[4] & 2
1680 3 14 ref $self eq __PACKAGE__ && is_string_tagged($other) ? :
1684 11 6 if $swap
1795 2 3 if @- > 1
1799 1 4 if defined $limit and @ret == $limit - 1
1802 3 1 if (CORE::length $plain > $prev)
1864 6 1 if CORE::length $name > $maxnamelen
1870 1 6 $tf & 1 ? :
1876 1 6 if ($tl == 0) { }
2 4 elsif ($tl == 1) { }
1889 1 6 $tf & 2 ? :