Branch Coverage

blib/lib/Perl/Critic/Policy/Subroutines/ProhibitUnusedPrivateSubroutines.pm
Criterion Covered Total %
branch 9 94 9.5


line true false branch
76 0 182 unless eval {
95 0 5 if &any(sub {
98 0 5 if $elem->forward
101 0 5 unless my $name = $elem->name
104 0 5 if $name =~ / :: /msx
107 0 5 if $self->{'_allow'}{$name}
110 5 0 if ($self->{'_allow_name_regex'})
111 0 5 if $name =~ / \A $self->{'_allow_name_regex'} \z /msx
116 5 0 unless $name =~ / \A $self->{'_private_name_regex'} \z /msx
119 0 0 if $self->_find_sub_call_in_document($elem, $document)
122 0 0 if $self->_find_sub_reference_in_document($elem, $document)
125 0 0 if $self->_find_sub_overload_in_document($elem, $document)
136 0 0 unless my $left_loc = $left_token->location
137 0 0 unless my $right_loc = $right_token->location
151 0 0 if (my $found = $document->find("PPI::Token::Word"))
153 0 0 unless $name eq $usage->content
154 0 0 unless is_function_call($usage) or is_method_call($usage)
157 0 0 if _compare_token_locations($usage, $start_token) < 0
159 0 0 if _compare_token_locations($finish_token, $usage) < 0
166 0 0 if _compare_token_locations($regexp, $start_token) >= 0 and _compare_token_locations($finish_token, $regexp) >= 0
169 0 0 if _find_sub_usage_in_regexp($name, $regexp, $document)
182 0 0 unless $document->find($_)
195 0 0 unless my $ppix = $document->ppix_regexp_from_element($regexp)
196 0 0 if $ppix->failures
198 0 0 unless $ppix->find("PPIx::Regexp::Token::Code")
199 0 0 unless my $doc = $code->ppi
201 0 0 unless $doc->find("PPI::Token::Word")
202 0 0 unless $name eq $word->content
203 0 0 unless is_function_call($word) or is_method_call($word)
224 0 0 if (my $found = $document->find("PPI::Statement::Include"))
226 0 0 unless "overload" eq $usage->module
229 0 0 unless $inx++ % 2
230 0 0 unless @{$arg;} == 1
233 0 0 if ($element->isa('PPI::Token::Quote')) { }
0 0 elsif ($element->isa('PPI::Token::Word')) { }
234 0 0 if $element->string eq $name
236 0 0 if $element->content eq $name
255 0 0 if (my $found = $document->find("PPI::Token::Symbol"))
257 0 0 unless $symbol eq $usage->content
260 0 0 if $prior and $prior->isa("PPI::Token::Cast") and "\\" eq $prior->content
265 0 0 unless is_function_call($usage) or $prior and $prior->isa("PPI::Token::Word") and "goto" eq $prior->content
271 0 0 if _compare_token_locations($usage, $start_token) < 0
273 0 0 if _compare_token_locations($finish_token, $usage) < 0
286 0 0 if $element->isa("PPI::Node")
287 0 0 if $element->significant
298 0 0 unless my(@arguments) = map({_expand_element($_);} $include->arguments)
304 0 0 if ($element->isa('PPI::Token::Operator') and $IS_COMMA{$element->content}) { }