Branch Coverage

blib/lib/Perl/Lint/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm
Criterion Covered Total %
branch 50 60 83.3


line true false branch
37 1 23 if (my $this_policies_arg = $args->{'prohibit_capture_without_test'})
52 0 589 if ($token_type == 145 or $token_type == 146)
58 47 542 if ($token_type == 187 or $token_type == 156)
60 0 47 if ($depth < 0 and scalar @is_tested_by_depth < -$depth)
63 5 42 $is_in_context_to_assign ? :
67 10 118 if ($token_type == 106) { }
7 111 elsif ($token_type == 6) { }
30 81 elsif ($token_type == 53 or $token_type == 14) { }
80 0 30 unless $token = $$tokens[++$i]
84 19 5 if ($exceptions{$token_data} and $token_type == 122 or $token_type == 70 or $transfer_of_control_stmt_token_types{$token_type})
92 0 5 unless $token = $$tokens[++$i]
93 2 3 if ($token->{'type'} == 125)
94 0 2 unless $token = $$tokens[++$i]
97 2 0 if ($exceptions{$token_data} and $token_type == 64)
110 56 486 if ($token_type == 137 and $token_data =~ /\A\$[1-9][0-9]*\Z/)
111 11 45 if (&none(sub { $_; } , @is_tested_by_depth))
124 16 470 if ($control_stmt_token_types{$token_type})
127 10 6 if ($token_type == 107)
131 0 53 if ($token_type == 107) { }
10 43 elsif ($token_type == 108) { }
7 36 elsif ($token_type == 187 or $token_type == 156) { }
135 10 0 if --$lpnum <= 0
139 0 7 if ($depth + 1 < 0 and scalar @is_tested_by_depth < -$depth + 1)
152 6 18 if ($token_type == 187 or $token_type == 156) { }
6 12 elsif ($token_type == 106) { }
162 20 450 if ($token_type == 109)
166 0 20 if ($depth < 0 and scalar @is_tested_by_depth < -$depth)
174 23 427 if ($token_type == 110)
180 12 415 if ($token_type == 65)
186 100 325 if ($token_type == 106)