Branch Coverage

blib/lib/Perl/Critic/Config.pm
Criterion Covered Total %
branch 92 104 88.4


line true false branch
54 55 224 if (defined $args{'-top'} or defined $args{'-theme'})
139 81 198 if (not defined $profile_source or $profile_source ne "NONE")
144 4 275 if ($errors->has_exceptions)
154 9 1386 $_[0] ? :
163 1 7898 unless ($args{'-policy'})
170 7742 156 if (&blessed($policy))
191 0 7897 unless my $config = $policy_object->__get_config
197 7801 96 if ($policy_object->initialize_if_enabled($config)) { }
216 2 79 if $errors->has_exceptions
221 580 10875 if ($self->single_policy)
222 147 433 if ($self->_policy_is_single_policy($policy))
229 1 10874 unless $policy->is_safe or $self->unsafe_allowed
232 579 10295 $self->only ? :
235 229 10645 if $self->_policy_is_disabled($policy)
236 1599 9275 if $self->_policy_is_enabled($policy)
237 2538 8336 if $self->_policy_is_unimportant($policy)
238 145 10729 unless $self->_policy_is_thematic($policy)
239 38 10836 if $self->_policy_is_included($policy)
240 36 10838 if $self->_policy_is_excluded($policy)
243 3279 7595 unless $load_me
248 2 77 if ($self->single_policy and scalar $self->policies != 1)
312 0 580 unless @patterns
336 1 1 if (scalar $self->policies == 0) { }
366 8 829 if ($args_value)
369 4 4 if (ref $args_value) { }
377 829 8 unless (@regexes)
381 554 275 if (ref $default_value) { }
1 274 elsif ($default_value) { }
392 3 15 unless (eval {
410 834 3 unless ($found_errors)
429 0 279 if ($args_value) { }
441 1 278 unless ($Perl::Critic::Config::PROFILE_STRICTNESSES{$profile_strictness})
470 0 279 if ($args_value) { }
482 1 278 if (is_integer($verbosity) and not is_valid_numeric_verbosity($verbosity)) { }
512 67 212 if ($args_value) { }
524 273 6 if (is_integer($severity)) { }
1 5 elsif (not &any(sub {
525 272 1 if ($severity >= $Perl::Critic::Config::SEVERITY_LOWEST and $severity <= $Perl::Critic::Config::SEVERITY_HIGHEST) { }
571 2 277 if (defined $args_value and $args_value ne '') { }
583 278 1 if (is_integer($top) and $top >= 0) { }
609 52 227 if ($args_value) { }
621 0 279 if ($theme_rule =~ /$Perl::Critic::Config::RULE_INVALID_CHARACTER_REGEX/msx) { }
642 1 278 if ($Perl::Critic::Config::EVAL_ERROR) { }
657 0 278 unless (eval {
672 0 279 if ($args_value) { }
0 279 elsif ($ENV{'PERLCRITIC_PAGER'}) { }
683 0 279 if ($pager eq "\$PAGER")
702 5 1390 if (defined $args_value) { }
718 1395 0 if (eval {
732 5 1390 if ($found_errors) { }
760 0 279 'ARRAY' eq ref $args_value ? :
945 0 87 if $self->{'_program_extensions_as_regexes'}