Branch Coverage

blib/lib/Perl/Critic/Policy/TooMuchCode/ProhibitUnusedImport.pm
Criterion Covered Total %
branch 25 32 78.1


line true false branch
58 448 86 unless $_[1]->isa("PPI::Token::Word")
63 0 20 unless $elem->find(sub {
66 1 86 if ($el_word->isa("PPI::Token::Symbol"))
78 5 15 if (@to_report)
82 2 7 if (exists $used{"is_" . $import} or exists $used{"to_" . $import} and exists $$moose_types{$imported{$import}[0]})
106 0 21 if $st->schild(0) eq "no"
107 0 21 unless my $expr_qw = $st->find(sub {
110 5 16 if exists $is_ignored->{$included_module}
112 16 0 if (@$expr_qw == 1)
116 0 27 if $w =~ /\A [:\-\+]/x
134 8 12 unless $doc->find("PPI::Token::Symbol")
146 115 5 unless $doc->find($class)
147 0 5 unless my $str = "PPIx::QuoteLike"->new($e)
157 9 11 unless $doc->find("PPI::Statement::Variable")
158 7 5 unless $st->schildren == 5
161 0 3 unless $children[0]->content eq "our" and $children[1]->content eq '@EXPORT' || $children[1]->content eq '@EXPORT_OK' and $children[2]->content eq "=" and $children[3]->isa("PPI::Token::QuoteLike::Words") and $children[4]->content eq ";"