blib/lib/Perl/Lint/Policy/ValuesAndExpressions/ProhibitMagicNumbers.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 58 | 73 | 79.4 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
58 | 0 | 28 | 8 | defined $begin and defined $end |
98 | 771 | 23 | 0 | $token_type == 122 and $constant_creator_subroutines{$token_data} |
112 | 767 | 3 | 8 | $token_type == 127 and $token_data eq 'Readonly' |
148 | 625 | 151 | 0 | $token_data eq '$VERSION' and $token_type == 166 || $token_type == 194 |
159 | 522 | 14 | 0 | $token_type == 124 and !$allow_to_the_right_of_a_fat_comma || $is_readonly_array1_ctx |
232 | 0 | 1 | 1 | $begin->{'type'} == 170 and $end->{'type'} == 170 |
233 | 0 | 1 | 0 | $allowed_values{$begin->{'data'}} and $allowed_values{$end->{'data'}} |
258 | 1 | 1 | 1 | not $allowed_values{$num} and $num ne -1 |
350 | 14 | 217 | 42 | $is_in_assigning_context and $invalid_token |
399 | 0 | 39 | 0 | $i and $allowed_types{'Float'} |
2 | 7 | 30 | $i and $allowed_types{'Float'} and $allowed_values{$token_data + 0} | |
8 | 0 | 1 | $allowed_values{'all_integers'} && $token_data =~ /[.]0+\z/ | |
401 | 4 | 26 | 0 | $next_token and $next_token->{'type'} == 171 |
line | l | !l | condition |
---|---|---|---|
50 | 11 | 45 | $this_policies_arg->{'allow_to_the_right_of_a_fat_comma'} // 1 |
61 | 3 | 5 | $delta //= 1 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
98 | 35 | 5 | 794 | $token_type == 93 or $token_type == 71 |
40 | 0 | 794 | $token_type == 93 or $token_type == 71 or $token_type == 122 and $constant_creator_subroutines{$token_data} | |
120 | 1 | 1 | 6 | $token_data eq 'Scalar' or $token_data eq 'Array' |
148 | 149 | 2 | 0 | $token_type == 166 || $token_type == 194 |
159 | 4 | 1 | 9 | !$allow_to_the_right_of_a_fat_comma || $is_readonly_array1_ctx |
89 | 0 | 536 | $token_type == 65 or $token_type == 124 and !$allow_to_the_right_of_a_fat_comma || $is_readonly_array1_ctx | |
222 | 1 | 2 | 524 | $token_type == 133 or $token_type == 134 |
226 | 1 | 2 | 19 | $token_type == 106 or $token_type == 109 |
300 | 9 | 1 | 3 | not $allow_to_the_right_of_a_fat_comma or $is_readonly_array1_ctx |
387 | 10 | 0 | 104 | $allowed_values{'all_integers'} or $allowed_values{$token_data + 0} |