Branch Coverage

blib/lib/Perl/Critic/Policy/NamingConventions/Capitalization.pm
Criterion Covered Total %
branch 63 84 75.0


line true false branch
234 0 9328 if $configuration_exceptions->has_exceptions
239 275 997 if &any(sub {
240 264 733 unless $name =~ /$capitalization_regex/msx
245 0 1166 if ($configuration_exceptions->has_exceptions)
258 9236 92 if (my $tag_properties = $CAPITALIZATION_SCHEME_TAGS{$capitalization}) { }
0 92 elsif ($capitalization =~ / \A : /msx) { }
278 0 92 unless (eval {
306 0 47530 unless (eval {
330 795 2207 if ($elem->isa("PPI::Statement::Variable"))
334 250 1957 if ($elem->isa("PPI::Statement::Sub"))
338 9 1948 if (my(@names) = get_constant_name_elements_from_declaring_statement($elem))
345 139 1809 if ($elem->isa("PPI::Statement::Package"))
349 142 1667 if ($elem->isa("PPI::Statement::Compound") and $elem->type eq "foreach")
355 70 1597 if ($elem->isa("PPI::Token::Label"))
369 242 556 if ($elem->type eq 'local') { }
140 416 elsif ($elem->type eq 'our') { }
372 36 206 if $name =~ /$PACKAGE_REGEX/msx
373 104 102 if is_perl_global($name)
397 133 283 if (not $parent or $parent->isa('PPI::Document')) { }
408 68 215 if (_is_directly_in_scope_block($elem)) { }
439 34 216 if $elem->isa("PPI::Statement::Scheduled")
466 27 150 if $violation
478 0 142 unless $second_element
480 108 34 if ($second_element->isa('PPI::Token::Word')) { }
488 0 142 unless $symbol
489 0 142 unless $symbol->isa("PPI::Token::Symbol")
493 0 142 if ($type eq 'local') { }
34 108 elsif ($type eq 'our') { }
496 0 0 if $name =~ /$PACKAGE_REGEX/msx
497 0 0 if is_perl_global($name)
518 2 68 if _is_not_real_label($elem)
527 264 1008 if (my $message = &$test($to_match))
555 138 145 if is_in_subroutine($elem)
558 68 77 unless $parent->isa("PPI::Structure::Block")
561 0 77 unless $grand_parent
562 0 77 if $grand_parent->isa("PPI::Document")
564 0 77 unless $grand_parent->isa("PPI::Statement::Compound")
567 0 77 unless $type
568 9 68 if $type ne "continue"
572 0 68 if $great_grand_parent and not $great_grand_parent->isa("PPI::Document")
576 68 0 unless $prior_to_grand_parent
577 0 0 unless $prior_to_grand_parent->isa("PPI::Token::Word")