Branch Coverage

blib/lib/Perl/Lint/Policy/InputOutput/RequireCheckedSyscalls.pm
Criterion Covered Total %
branch 73 94 77.6


line true false branch
21 7 35 if (my $required_checked_syscalls_arg = $args->{'require_checked_syscalls'})
22 7 0 if (my $functions = $required_checked_syscalls_arg->{'functions'})
23 3 4 if ($functions eq ':builtins') { }
3 1 elsif ($functions eq ':all') { }
34 3 4 if ($allowed_functions = $required_checked_syscalls_arg->{'exclude_functions'})
49 9 656 if ($token_type == 65)
54 20 636 if ($token_type == 94)
55 8 12 if ($token_data eq 'Fatal') { }
4 8 elsif ($token_data eq 'autodie') { }
59 4 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 &any(sub { $_ eq $next_token_data; } , @target_functions)) { }
63 4 4 if ($token_type == 187) { }
4 0 elsif ($token_type == 151) { }
76 0 2 if ($token_type == 107) { }
2 0 elsif ($token_type == 172 || $token_type == 173 and &any(sub { $_ eq $token_data; } , @target_functions)) { }
83 0 0 if --$left_paren_num <= 0
92 2 2 if ($$tokens[$i + 1]{'type'} == 147) { }
95 1 3 if ($token_type == 187 and $token->{'data'} =~ /\A\s*:io\s*\Z/) { }
2 1 elsif ($token_type == 151) { }
111 2 634 if ($token_type == 127 and $token_data eq 'Fatal')
113 2 0 if ($skipped_token and $skipped_token->{'type'} == 127 and $skipped_token->{'data'} eq 'Exception')
117 2 6 if ($token_type == 147) { }
0 6 elsif ($token_type == 107) { }
0 6 elsif ($token_type == 172 || $token_type == 173 and &any(sub { $_ eq $token_data; } , @target_functions)) { }
2 4 elsif ($token->{'kind'} == 21) { }
121 2 2 if ($token_type == 187) { }
2 0 elsif ($token_type == 151) { }
134 0 0 if ($token_type == 107) { }
0 0 elsif ($token_type == 172 || $token_type == 173 and &any(sub { $_ eq $token_data; } , @target_functions)) { }
141 0 0 if --$left_paren_num <= 0
157 27 607 if ($token_kind == 17)
160 3 24 if ($$tokens[$i + 1]{'type'} == 107)
165 0 3 if ($token_type == 107) { }
169 3 0 if --$left_paren_num <= 0
176 97 510 if ($token_type == 70 or $is_target_all and $token_type == 0)
177 69 28 if ($is_target_all or &any(sub { $_ eq $token_data; } , @target_functions)) { }
1 27 elsif ($token_data eq 'no') { }
178 35 26 unless ($is_in_assign_context or $is_in_statement_context)
184 1 0 if ($next_token->{'type'} == 122 and $next_token->{'data'} eq 'autodie')
191 3 22 if ($is_target_all and $token_type == 204 || $token_type == 122 && $$tokens[++$i]{'type'} == 107)
195 1 2 if ($allowed_functions and $token_data =~ /\A$allowed_functions\s*\(?/) { }
2 0 elsif (not $is_in_assign_context || $is_in_statement_context) { }
204 16 491 if ($token_kind == 1)
210 100 391 if ($token_kind == 21)
211 5 95 if $is_enabled_autodie
213 21 74 if ($is_called_syscalls_in_void)