Branch Coverage

blib/lib/Perl/Critic/Policy/Subroutines/ProtectPrivateSubs.pm
Criterion Covered Total %
branch 25 28 89.2


line true false branch
98 0 100 unless eval {
116 138 280 if (my $prior = $elem->sprevious_sibling)
118 29 109 if $prior_name eq "package"
119 1 108 if $prior_name eq "require"
120 56 52 if $prior_name eq "use"
123 12 320 if ($self->_is_other_pkg_private_function($elem) or $self->_is_other_pkg_private_method($elem))
136 82 229 unless is_method_call($elem) or is_function_call($elem)
153 312 14 unless $content =~ / \A $private_name_regex \z /msx
154 1 13 unless my $operator = $elem->sprevious_sibling
155 0 13 if $operator->content ne "->"
157 0 13 unless my $package = $operator->sprevious_sibling
158 2 11 unless $package->isa("PPI::Token::Word")
163 3 8 if $package->content eq "shift" or $package->content eq "__PACKAGE__"
167 2 6 if $self->{'_allow'}{"${package}::$content"}