Branch Coverage

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


line true false branch
229 0 520 if $configuration_exceptions->has_exceptions
234 0 124 if &any(sub {
235 0 124 unless $name =~ /$capitalization_regex/msx
240 0 65 if ($configuration_exceptions->has_exceptions)
253 520 0 if (my $tag_properties = $CAPITALIZATION_SCHEME_TAGS{$capitalization}) { }
0 0 elsif ($capitalization =~ / \A : /msx) { }
273 0 0 unless (eval {
301 0 2730 unless (eval {
325 85 196 if ($elem->isa("PPI::Statement::Variable"))
329 5 191 if ($elem->isa("PPI::Statement::Sub"))
333 0 191 if (my(@names) = get_constant_name_elements_from_declaring_statement($elem))
340 28 163 if ($elem->isa("PPI::Statement::Package"))
344 6 157 if ($elem->isa("PPI::Statement::Compound") and $elem->type eq "foreach")
350 0 157 if ($elem->isa("PPI::Token::Label"))
364 0 85 if ($elem->type eq 'local') { }
27 58 elsif ($elem->type eq 'our') { }
367 0 0 if $name =~ /$PACKAGE_REGEX/msx
368 0 0 if is_perl_global($name)
392 48 10 if (not $parent or $parent->isa('PPI::Document')) { }
403 0 10 if (_is_directly_in_scope_block($elem)) { }
434 0 5 if $elem->isa("PPI::Statement::Scheduled")
461 0 28 if $violation
473 0 6 unless $second_element
475 6 0 if ($second_element->isa('PPI::Token::Word')) { }
483 0 6 unless $symbol
484 0 6 unless $symbol->isa("PPI::Token::Symbol")
488 0 6 if ($type eq 'local') { }
0 6 elsif ($type eq 'our') { }
491 0 0 if $name =~ /$PACKAGE_REGEX/msx
492 0 0 if is_perl_global($name)
513 0 0 if _is_not_real_label($elem)
522 0 124 if (my $message = &$test($to_match))
550 2 8 if is_in_subroutine($elem)
553 0 8 unless $parent->isa("PPI::Structure::Block")
556 0 8 unless $grand_parent
557 0 8 if $grand_parent->isa("PPI::Document")
559 0 8 unless $grand_parent->isa("PPI::Statement::Compound")
562 0 8 unless $type
563 8 0 if $type ne "continue"
567 0 0 if $great_grand_parent and not $great_grand_parent->isa("PPI::Document")
571 0 0 unless $prior_to_grand_parent
572 0 0 unless $prior_to_grand_parent->isa("PPI::Token::Word")