Branch Coverage

blib/lib/Perl/Lint/Policy/Variables/ProhibitPackageVars.pm
Criterion Covered Total %
branch 88 100 88.0


line true false branch
17 3 7 if (my $this_policies_arg = $$args{'prohibit_package_vars'})
18 3 0 if (my $add_packages = $$this_policies_arg{'add_packages'})
28 10 216 if ($token_type == 91) { }
8 208 elsif ($token_type == 90) { }
28 180 elsif ($token_type == 194 or $token_type == 195 or $token_type == 196 or $token_type == 166 or $token_type == 168 or $token_type == 169) { }
3 177 elsif ($token_type == 137 and $token_data eq '$:') { }
10 333 elsif ($token_type == 94 and $token_data eq 'vars') { }
31 5 5 if ($token_type == 107) { }
5 0 elsif ($token_type == 194 or $token_type == 195 or $token_type == 196 or $token_type == 166 or $token_type == 168 or $token_type == 169) { }
36 0 20 if ($token_type == 107) { }
5 15 elsif ($token_type == 108) { }
10 5 elsif ($token_type == 194 or $token_type == 195 or $token_type == 196 or $token_type == 166 or $token_type == 168 or $token_type == 169) { }
40 5 0 if (--$left_paren_num <= 0)
41 4 1 if ($violation)
56 6 4 unless ($$token{'data'} =~ /\A.[A-Z0-9_]+\Z/)
76 2 3 unless ($$token{'data'} =~ /\A.[A-Z0-9_]+\Z/)
90 2 6 if ($token_type == 107) { }
101 0 20 if ($token_type == 107) { }
2 18 elsif ($token_type == 108) { }
2 16 elsif ($token_type == 104) { }
6 10 elsif ($token_type == 126) { }
107 2 0 if (--$left_paren_num <= 0)
125 2 0 if ($does_exist_namespace_resolver)
127 1 1 if ($$token{'type'} == 65)
130 0 2 unless (any sub { $package =~ /\A[\$\@\%]$_/; } , @allowed_packages)
137 0 1 if ($is_violated)
156 7 19 if ($token_type == 127) { }
7 12 elsif ($token_type == 126) { }
1 11 elsif ($token_type == 65) { }
5 6 elsif ($token_type == 106) { }
171 1 5 if ($does_exist_namespace_resolver and $is_assigned)
174 1 0 if (any sub { $package_name =~ /\A[\$\@\%]$_/; } , @allowed_packages)
199 24 4 $$tokens[$i + 1]{'type'} == 126 ? :
203 28 82 if ($token_type == 65 or $token_type == 106) { }
35 47 elsif ($token_type == 127) { }
211 24 4 if ($does_exist_namespace_resolver)
215 7 17 if (any sub { $package_name =~ /\A[\$\@\%]$_/; } , @allowed_packages)
219 12 5 unless ($var_name =~ /\A.[A-Z0-9_]+\Z/)
232 3 0 $$token{'type'} == 105 ? :
237 3 9 if ($token_type == 65) { }
3 6 elsif ($token_type == 106) { }
245 2 1 if ($does_exist_namespace_resolver and not $$var_token{'data'} =~ /\A.[A-Z0-9_]+\Z/)
261 3 44 if ($token_type == 187) { }
13 31 elsif ($token_type == 172 or $token_type == 173) { }
10 21 elsif ($token_type == 106) { }
263 6 0 if ($elem =~ /\A[\$\@\%](.*)\Z/)
264 3 3 unless ($1 =~ /\A[A-Z0-9_]+\Z/)
271 12 1 if ($token_data =~ /\A[\$\@\%](.*)\Z/)
272 6 6 unless ($1 =~ /\A[A-Z0-9_]+\Z/)
281 6 4 if ($is_used_package_var)