Branch Coverage

blib/lib/Perl/Lint/Policy/InputOutput/RequireCheckedClose.pm
Criterion Covered Total %
branch 57 78 73.0


line true false branch
26 5 283 if ($token_type == 65)
31 18 265 if ($token_type == 94)
32 6 12 if ($token_data eq 'Fatal') { }
4 8 elsif ($token_data eq 'autodie') { }
35 2 4 if ($next_token_type == 147) { }
2 2 elsif ($next_token_type == 107) { }
2 0 elsif ($next_token_type == 172 || $next_token_type == 173 and $next_token->{'data'} eq 'close') { }
38 1 2 if ($token_type == 187 and $token->{'data'} eq 'close') { }
1 1 elsif ($token_type == 151) { }
50 0 2 if ($token_type == 107) { }
2 0 elsif ($token_type == 172 || $token_type == 173 and $token->{'data'} eq 'close') { }
57 0 0 if --$left_paren_num <= 0
66 2 2 if ($$tokens[$i + 1]{'type'} == 147) { }
69 1 3 if ($token_type == 187 and $token->{'data'} =~ /\A\s*:io\s*\Z/) { }
2 1 elsif ($token_type == 151) { }
85 1 264 if ($token_type == 127 and $token_data eq 'Fatal')
87 1 0 if ($skipped_token and $skipped_token->{'type'} == 127 and $skipped_token->{'data'} eq 'Exception')
90 1 2 if ($token_type == 147) { }
0 2 elsif ($token_type == 107) { }
0 2 elsif ($token_type == 172 || $token_type == 173 and $token->{'data'} eq 'close') { }
0 2 elsif ($token->{'kind'} == 21) { }
93 1 0 if ($token_type == 187 and $token->{'data'} eq 'close') { }
0 0 elsif ($token_type == 151) { }
105 0 0 if ($token_type == 107) { }
0 0 elsif ($token_type == 172 || $token_type == 173 and $token->{'data'} eq 'close') { }
112 0 0 if --$left_paren_num <= 0
128 14 250 if ($token_kind == 17)
131 2 12 if ($$tokens[$i + 1]{'type'} == 107)
136 0 2 if ($token_type == 107) { }
140 2 0 if --$left_paren_num <= 0
147 46 204 if ($token_type == 70)
148 34 12 if ($token_data eq 'close') { }
1 11 elsif ($token_data eq 'no') { }
149 18 12 unless ($is_in_assign_context or $is_in_statement_context)
155 1 0 if ($next_token->{'type'} == 122 and $next_token->{'data'} eq 'autodie')
162 8 196 if ($token_kind == 1)
167 53 143 if ($token_kind == 21)
168 5 48 if $is_enabled_autodie
170 10 38 if ($is_called_close_in_void)