Branch Coverage

blib/lib/Perl/Lint/Policy/InputOutput/RequireBriefOpen.pm
Criterion Covered Total %
branch 61 74 82.4


line true false branch
19 1 32 if (my $this_policies_arg = $$args{'require_brief_open'})
38 17 601 if ($token_type == 109)
43 17 584 if ($token_type == 110)
44 9 8 unless $opened_file_handlers_for_each_depth[-1][$depth]
51 4 13 if ($function_declared_depth{$depth})
53 0 4 unless (@opened_file_handlers_for_each_depth)
63 9 575 if ($token_type == 127 and $token_data eq 'CORE')
64 0 9 unless $token = $$tokens[++$i]
65 9 0 if ($$token{'type'} == 126)
66 0 9 unless $token = $$tokens[++$i]
67 7 2 if ($$token{'type'} == 127 and $$token{'data'} eq 'GLOBAL')
68 0 7 unless $token = $$tokens[++$i]
69 7 0 if ($$token{'type'} == 126)
70 0 7 unless $token = $$tokens[++$i]
83 53 2 if ($token_type == 70 and $token_data eq 'open' or $is_core_func and $token_type == 127 and $token_data eq 'open')
91 34 77 if ($token_type == 194 or $token_type == 191 or $token_type == 166) { }
10 67 elsif ($token_type == 122) { }
5 62 elsif ($token_type == 109) { }
9 53 elsif ($token_type == 79 or $token_type == 80 or $token_type == 81 or $token_type == 104) { }
100 7 3 if ($token_data =~ /\A[A-Z0-9_]+\z/)
118 5 48 if ($lbnum)
121 5 0 if ($token_type == 110)
122 5 0 if --$lbnum <= 0
132 21 0 if ($token_type == 0 or $token_type == 70 and $token_data eq 'close' or $is_core_func and $token_type == 127 and $token_data eq 'close')
136 0 27 unless $token = $$tokens[++$i]
138 2 25 if ($token_type == 107)
139 0 2 unless $token = $$tokens[++$i]
145 21 6 if ($token_type == 194 or $token_type == 191 or $token_type == 166) { }
3 3 elsif ($token_type == 122) { }
153 16 10 if (defined $hit)
154 13 3 if ($$token{'line'} - $$hit{'line'} <= $line_gap)
167 3 528 if ($token_type == 64 and $token_data eq 'close')
172 1 1 if ($var_type == 194 or $var_type == 191 or $var_type == 166)
179 1 1 if (defined $hit)
180 1 0 if ($$var_token{'line'} - $$hit{'line'} <= $line_gap)
190 4 527 if ($token_type == 63)
199 13 20 unless $opened_file_handlers_for_each_depth[-1][0]