Branch Coverage

blib/lib/Devel/MAT/SV.pm
Criterion Covered Total %
branch 282 482 58.5


line true false branch
59 162 9 unless defined *{"$_[0]::type";}{"CODE"}
67 0 573408 unless my $class = $types{$type}
220 0 0 unless my $magic = $self->{'magic'}
241 28995 481 unless my $magic = $self->{'magic'}
246 344 137 $obj_at ? :
2 479 $ptr_at ? :
264 0 1 unless my $magic = $self->{'magic'}
269 1 0 if $type eq "<"
375 1407 179463 if ($match & 2 and my $blessed = $self->blessed)
376 1405 2 $no_desc ? :
380 163841 17029 unless $self->{'magic'}
383 15379 1651 if (my $obj = $self->df->sv_at($obj_at))
385 540 14839 $is_strong ? :
15379 0 if ($match & ($is_strong ? 1 : 2))
386 540 14839 $is_strong ? :
387 10358 5021 $no_desc ? :
392 4 17026 if ($match & 1 and my $ptr = $self->df->sv_at($ptr_at))
393 4 0 $no_desc ? :
398 180870 0 unless $self->{'annotations'}
400 0 0 unless my $val = $self->df->sv_at($val_at)
402 0 0 $no_desc ? :
406 0 180870 unless wantarray
641 0 0 defined $file ? :
706 1025 14361 if $self->scalar
707 499 14887 if $self->array
708 793 14593 if $self->hash
709 12030 3356 if $self->code
710 15378 8 if $self->egv
711 44 15342 if $self->io
712 0 15386 if $self->form
724 20422 0 if ($match & 1)
726 103110 19422 unless my $sv = $self->$slot
727 14396 5026 $no_desc ? :
732 20414 8 if (my $egv = $self->egv)
736 20368 46 $egv_is_self ? :
20414 0 if ($match & ($egv_is_self ? 2 : 1))
737 20368 46 $egv_is_self ? :
738 15384 5030 $no_desc ? :
746 0 4 $no_desc ? :
797 0 217575 if $flags
849 0 5 unless defined(my $pv = $self->pv)
850 1 4 if defined $maxlen and $maxlen < length $pv
854 3 2 if ($pv =~ /^[\x20-\x7e]*$/u) { }
859 0 2 $3 ? :
0 2 $2 ? :
0 2 $1 ? :
862 1 4 if $truncated
882 1 1 unless my $glob_at = $self->glob_at
889 199890 205543 if defined $self->uv or defined $self->iv or defined $self->nv or defined $self->pv
898 13613 94101 if defined $self->uv
899 18 107696 if defined $self->iv
900 1516 106198 if defined $self->nv
901 48249 59465 if defined $self->pv
903 45622 62092 unless @flags
914 0 107811 if ($match & 1 and my $ourstash = $self->ourstash)
915 0 0 $no_desc ? :
949 0 26241 if $flags
986 116 7380 $self->is_weak ? :
999 116 7410 $is_weak ? :
7526 0 if ($match & ($is_weak ? 2 : 1) and my $rv = $self->rv)
1000 116 7410 $is_weak ? :
1001 7499 27 $no_desc ? :
1005 0 7526 if ($match & 1 and my $ourstash = $self->ourstash)
1006 0 0 $no_desc ? :
1021 0 0 if $self->uv
1041 0 0 $self->is_backrefs ? :
1053 31454 25473 $n ? :
1085 3 1 unless my $glob_at = $self->glob_at
1102 9364 12876 unless wantarray
1128 7142 2371 if $self->is_unreal
1143 10533 2419 if ($self->is_unreal) { }
1144 10533 0 if ($match & 2)
1146 0 4374943 unless my $sv = $self->elem($idx)
1148 26576 4348367 $no_desc ? :
1155 92 25002 unless my $sv = $self->elem($idx)
1157 12840 12162 $no_desc ? :
1159 25001 1 if ($match & 1)
1160 12840 12161 $no_desc ? :
1163 2989 0 if ($match & 4 and $sv->type eq "REF" and not $sv->{'magic'} and my $rv = $sv->rv)
1164 2392 597 $no_desc ? :
1173 0 1 $no_desc ? :
1209 0 0 if ($match & 1)
1213 0 0 if (my $padnames = $df->sv_at($self->elem_at(0)))
1214 0 0 $no_desc ? :
1219 0 0 unless my $pad = $df->sv_at($self->elem_at($idx))
1221 0 0 $no_desc ? :
1255 0 0 unless my $namepv = $self->elem($padix)
1256 0 0 unless $namepv->type eq "SCALAR"
1275 0 0 if $namepv = $self->elem($padix) and $namepv->type eq "SCALAR" and $namepv->pv eq $padname
1297 0 0 if ($match & 1)
1302 0 0 unless my $padname = $df->sv_at($self->elem_at($idx))
1304 0 0 $no_desc ? :
1356 0 0 $padname ? :
1378 0 4 unless my $padix = $self->padcv->padix_from_padname($padname)
1396 6270 503 if ($match & 1 and my $argsav = $svs[0])
1397 6258 12 $no_desc ? :
1402 2846 48973 unless my $sv = $svs[$idx]
1405 242 48731 unless ($no_desc)
1407 86 156 $padname ? :
1408 70 172 if ($name) { }
1416 48973 0 if ($match & 1)
1417 48731 242 $no_desc ? :
1420 423 0 if ($match & 4 and $sv->type eq "REF" and not $sv->{'magic'} and my $rv = $sv->rv)
1421 418 5 $no_desc ? :
1469 2264 7761 if (my $backrefs = $self->backrefs)
1470 2229 35 if $backrefs->type eq "ARRAY"
1485 0 3 unless my $glob_at = $self->glob_at
1534 0 536 unless wantarray
1543 667 2197 $self->{'name'} ? :
1556 5684 2277 if (my $backrefs = $self->backrefs)
1559 5674 10 if ($backrefs->type eq 'ARRAY') { }
1560 5674 0 if ($match & 1)
1561 637 5037 $no_desc ? :
1565 5674 0 if ($match & 4)
1567 25417 5322711 $no_desc ? :
1573 10 0 if ($match & 2)
1574 10 0 $no_desc ? :
1581 24078 2269069 unless my $sv = $df->sv_at($self->value_at($key))
1582 32099 2236970 $no_desc ? :
1585 2269069 0 if ($match & 1)
1586 32099 2236970 $no_desc ? :
1589 4679 0 if ($match & 4 and $sv->type eq "REF" and not $sv->{'magic'} and my $rv = $sv->rv)
1590 4664 15 $no_desc ? :
1599 0 1 $no_desc ? :
1602 0 1 $no_desc ? :
1687 0 1 unless my $sv = $self->value($key)
1688 1 0 if ($sv->type eq 'GLOB') { }
0 0 elsif ($sv->type eq 'REF') { }
1727 5704 0 if ($match & 1)
1728 0 5704 if (my $sv = $self->mro_linearall)
1729 0 0 $no_desc ? :
1732 1958 3746 if (my $sv = $self->mro_linearcurrent)
1733 393 1565 $no_desc ? :
1736 0 5704 if (my $sv = $self->mro_nextmethod)
1737 0 0 $no_desc ? :
1740 1958 3746 if (my $sv = $self->mro_isa)
1741 393 1565 $no_desc ? :
1788 0 43400 unless defined $depth
1797 43400 0 if $df->{'perlver'} > 85262335
1818 117242 297678 if ($(Syntax::Keyword::Match/topic) == 1) { }
0 297678 elsif ($(Syntax::Keyword::Match/topic) == 2) { }
43516 254162 elsif ($(Syntax::Keyword::Match/topic) == 3) { }
0 254162 elsif ($(Syntax::Keyword::Match/topic) == 4) { }
172852 81310 elsif ($(Syntax::Keyword::Match/topic) == 5) { }
0 81310 elsif ($(Syntax::Keyword::Match/topic) == 6) { }
23569 57741 elsif ($(Syntax::Keyword::Match/topic) == 7) { }
23639 34102 elsif ($(Syntax::Keyword::Match/topic) == 8) { }
34102 0 elsif ($(Syntax::Keyword::Match/topic) == 9) { }
0 0 elsif ($(Syntax::Keyword::Match/topic) == 10) { }
1839 0 43400 if ($padlist)
1848 43400 0 if ($df->{'perlver'} >= 85065728) { }
0 0 elsif ($padlist) { }
1861 0 43400 if ($padnames)
1868 0 0 unless my $padnamesv = $padnames->elem($padix)
1869 0 0 if $padnamesv->immortal
1876 7 23632 unless $pad
1885 0 43400 if ($df->ithreads)
1889 0 0 unless my $idxes = $$self{"${type}ix"}
1893 0 0 $e ? :
1897 3286 40114 if ($self->is_cloned and my $oproot = $self->oproot)
1898 3286 0 if (my $protosub = $df->{'protosubs_by_oproot'}{$oproot})
1967 0 0 $line ? :
2025 14026 7191 unless $self->{'consts_at'}
2045 0 0 $self->stash ? :
2052 0 23 if (defined(my $hekname = $self->hekname)) { }
22 1 elsif (my $glob = $self->glob) { }
2111 5 11 if defined $padnames->[$padix] and defined($thisname = $padnames->[$padix]->name) and $thisname eq $padname
2172 5425 0 $self->{'pads'} ? :
2187 7 0 $self->{'pads'} ? :
2211 0 3 unless $depth
2223 6426 5973 if $self->oproot
2224 3652 8747 if $self->constval
2225 5226 7173 if $self->is_xsub
2227 938 11461 if $self->is_cloned
2228 282 12117 if $self->is_clone
2241 15791 0 $pads ? :
2248 325 15466 $is_weakoutside ? :
6487 9304 if ($match & ($is_weakoutside ? 2 : 1) and my $scope = $self->scope)
2249 325 6162 $is_weakoutside ? :
2250 6445 42 $no_desc ? :
2254 13419 2372 if ($match & 2 and my $stash = $self->stash)
2255 10037 3382 $no_desc ? :
2260 1660 14131 $is_strong_gv ? :
15490 301 if ($match & ($is_strong_gv ? 1 : 2) and my $glob = $self->glob)
2261 1660 13830 $is_strong_gv ? :
2262 12107 3383 $no_desc ? :
2266 6798 8993 if ($match & 1 and my $constval = $self->constval)
2267 3652 3146 $no_desc ? :
2271 941 14850 if ($match & 8 and my $protosub = $self->protosub)
2272 938 3 $no_desc ? :
2280 0 15791 $ithreads ? :
15791 0 if ($match & ($ithreads ? 4 : 1))
2281 0 15791 $ithreads ? :
2284 0 33722 unless $sv
2285 33444 278 $no_desc ? :
2289 0 12524 unless $sv
2290 12418 106 $no_desc ? :
2295 0 15791 if ($match & 1 and $have_padlist)
2296 0 0 $no_desc ? :
2302 0 15791 $have_padlist ? :
15791 0 if ($match & ($have_padlist ? 4 : 1))
2303 0 15791 $have_padlist ? :
2305 0 15791 if (my $padnames_av = $self->padnames_av)
2306 0 0 $no_desc ? :
2311 2 6802 unless my $pad = $$pads[$depth - 1]
2313 6755 47 $no_desc ? :
2377 36 0 if ($match & 1)
2378 0 36 if (my $gv = $self->topgv)
2379 0 0 $no_desc ? :
2382 0 36 if (my $gv = $self->formatgv)
2383 0 0 $no_desc ? :
2386 0 36 if (my $gv = $self->bottomgv)
2387 0 0 $no_desc ? :
2428 0 0 if ($match & 1 and my $sv = $self->target)
2429 0 0 $no_desc ? :
2540 0 0 $n ? :
2560 0 0 unless wantarray
2581 0 0 if ($name_or_fieldix =~ /^\d+$/u) { }
2608 0 0 unless my $sv = $self->field($field->fieldix)
2610 0 0 $no_desc ? :
2612 0 0 if ($match & 1)
2613 0 0 $no_desc ? :
2616 0 0 if ($match & 4 and $sv->type eq "REF" and not $sv->{'magic'} and my $rv = $sv->rv)
2617 0 0 $no_desc ? :
2664 0 0 if ($(Syntax::Keyword::Match/topic) == 1) { }
2715 0 0 if ($name_or_fieldix =~ /^\d+$/u) { }
2728 0 0 if $name_or_fieldix =~ /^\d+$/u
2740 0 0 if ($match & 1)
2741 0 0 if (my $sv = $self->adjust_blocks)
2742 0 0 $no_desc ? :
2792 0 0 if ($type == 0) { }
0 0 elsif ($type == 1 or $type == 2) { }
0 0 elsif ($type == 3) { }
0 0 elsif ($type == 4) { }
2832 0 0 if ($field->type == 0) { }
2866 0 0 unless defined(my $idx = &first(sub { $fields->[$_]->name eq $name; } , 0 .. $#$fields))
2871 0 0 if ($field->type == 0) { }
2920 0 0 unless $match & 1
2929 0 0 unless $field->type == 0
2931 0 0 unless my $sv = $df->sv_at($self->field($idx))
2933 0 0 $no_desc ? :