Branch Coverage

blib/lib/Code/ART.pm
Criterion Covered Total %
branch 102 160 63.7


line true false branch
29 0 10 if ref $opt_ref ne 'HASH'
93 2 6 if not defined $code or ref $code
96 5 5 if ref $_
110 0 3 unless &looks_like_number($opt_ref->{'from'})
112 0 3 unless &looks_like_number($opt_ref->{'to'})
130 3 0 substr($code, $to) =~ / $OWS \S /mosux ? :
161 0 0 if not $Code::ART::insub
168 1 2 $target_code =~ /\A (?&PerlOWS) (?&PerlAssignmentOperator) $PPR::X::GRAMMAR /mosux ? :
171 0 3 unless ($test_code =~ /$statement_sequence/u)
180 0 3 if ($interim_return and not $final_return)
189 1 2 if $vardata->{'failed'}
195 0 7 if $decl > $to
199 7 0 if ($decl < $from) { }
200 3 1 if $from <= $_
4 3 unless my(@usages) = grep({$_ <= $to if $from <= $_;} keys %{$used;})
208 0 0 if (grep {$_ > $to;} keys %{$used;}) { }
246 1 1 if ($trailing{'comma'} or not $trailing{'semicolon'})
247 0 1 if $param_code =~ /\S/u
253 1 1 if ($leading_assignment) { }
0 1 elsif (defined $return_expr) { }
0 1 elsif ($final_return) { }
254 0 1 if ($final_return)
259 1 0 if ($single_expr) { }
284 0 0 $+{'hash'} ? :
0 0 $+{'array'} ? :
285 0 0 defined $new_name ? :
299 2 0 $use_version ge v5.22 ? :
309 1 1 $trailing{'comma'} || !$trailing{'semicolon'} ? :
324 0 3 if not defined $code or ref $code
327 3 3 if ref $_
340 0 3 unless &looks_like_number($opt_ref->{'from'})
342 0 3 unless &looks_like_number($opt_ref->{'to'})
346 0 3 if $expr_scope->{'failed'}
357 3 0 unless ($varname =~ /^[\$\@%]/u)
358 1 2 if (not $closure) { }
0 2 elsif ($expr_scope->{'use_version'} lt v5.26) { }
413 0 3 unless ($target =~ /$valid_target/u)
425 2 15 $raw_ws =~ /\s/u ? :
439 6 15 if $_ >= $from
9 0 if $_->{'declared_at'} >= 0
446 48 0 $match_all ? :
477 0 3 $var->{'out'} ? :
483 0 1 $var->{'raw_name'} =~ /_o?(?:[ahs]ref|sval)$/u ? :
1 1 $var->{'sigil'} eq '%' ? :
1 2 $var->{'sigil'} eq '@' ? :
489 0 3 if ($local_decl >= 0)
518 0 3 $is_state_var{$^R} ? :
1 2 length $+{'braced'} ? :
534 0 2 if ($+{'list_decl'}) { }
561 0 51 if $failed
564 0 269 unless substr($source, $index) =~ s/\A (?: \$\#? | [\@%] ) (?&PerlOWS) \{? (?&PerlOWS) \K $varname $PPR::X::GRAMMAR /$new_name/msux
572 44 7 if ($declared_at >= 0)
573 0 44 unless substr($source, $declared_at) =~ s/\A (?: \$\#? | [\@%] ) (?&PerlOWS) \{? (?&PerlOWS) \K $varname $PPR::X::GRAMMAR /$new_name/msux
595 0 0 if length $var > 2 and substr($var, 0, 2) eq '$#'
598 0 0 if length $var > 2 and substr($var, 0, 2) eq '@$' || substr($var, 0, 2) eq '%$'
602 0 0 unless $accessor
605 0 0 if $accessor eq '['
606 0 0 if $accessor eq '{'
668 51 0 if (substr($source, $varpos) =~ /$VAR_PAT/u)
674 0 51 if $varpos > 0 and $var{'name'} eq ';' and substr($source, $varpos - 1, 1) =~ /[\$\@%]/u
677 0 51 if ($varpos + length($var{'full'}) <= $orig_varpos)
688 0 51 if $varpos < 0
695 0 51 if $analysis->{'failed'}
701 51 427 if $varid == $varpos or $allvars->{$varid}{'used_at'}{$varpos}
1343 3658 6979 pos $_ == $pos ? :
1349 602 241 $spelling ne $word ? :
1751 2554 86 if (length $var > 2)
1753 2554 0 if substr($var, 1, 1) ne '$'
1760 949 1691 if ($Code::ART::varscope[-1]{'allow_decls'}) { }
1769 126 1565 $varlen > 1 && substr($var, 0, 1) eq '#' ? :
1773 1691 0 if length $cleanvar > 0
1775 43 1311 $+{'hash'} ? :
337 1354 $+{'array'} || $twigil ? :
1869 1 56 unless $matched
1875 104 739 if (not $id =~ /^\d+$/u) { }
1911 43 800 if (my $std_desc = $STD_VAR_DESC{$var->{'decl_name'}})
1917 608 235 $var_name =~ /\A$CACOGRAMS_PAT\Z/u ? :
1924 6303 9020 if $var == $other_var or not _share_scope($var, $other_var)
1927 3282 5738 $other_name eq $var_name ? :
1929 3366 5654 if ($other_name =~ /\A$matcher\z/u)