Branch Coverage

blib/lib/PPIx/EditorTools/Outline.pm
Criterion Covered Total %
branch 52 64 81.2


line true false branch
23 0 9 unless defined $ppi
34 2 1131 if ref $_[0] eq 'PPI::Statement::Package'
35 17 1114 if ref $_[0] eq 'PPI::Statement::Include'
36 6 1108 if ref $_[0] eq 'PPI::Statement::Sub'
37 38 1070 if ref $_[0] eq 'PPI::Statement'
49 2 61 if (ref $thing eq 'PPI::Statement::Package') { }
17 44 elsif (ref $thing eq 'PPI::Statement::Include') { }
6 38 elsif (ref $thing eq 'PPI::Statement::Sub') { }
38 0 elsif (ref $thing eq 'PPI::Statement') { }
50 0 2 if ($not_first_one)
51 0 0 unless ($$cur_pkg{'name'})
61 0 17 if $thing->type eq 'no'
62 9 8 if ($thing->pragma) { }
7 1 elsif ($thing->module) { }
66 7 0 unless ($check_alternate_sub_decls)
68 5 2 if grep {$thing->module eq $_;} 'Method::Signatures', 'MooseX::Declare', 'MooseX::Method::Signatures', 'Moose::Role', 'Moose'
85 3 35 unless defined $node2
90 33 2 if (defined $$node2{'content'})
91 0 33 if ($$node2{'content'} =~ /\n/)
98 17 18 if ($node1->isa('PPI::Token::Word') and $node1->content eq 'has')
106 0 18 if ($node1->isa('PPI::Token::Word') and $node1->content eq 'event')
113 5 4 if ($check_alternate_sub_decls)
116 757 129 unless $_[1]->isa('PPI::Token::Word')
117 110 19 unless $_[1]->content =~ /^(?:func|method|before|after|around|override|augment|class|role)\z/
118 0 19 unless $_[1]->next_sibling->isa('PPI::Token::Whitespace')
119 0 19 unless my $sib_content = $_[1]->next_sibling->next_sibling->content
126 0 19 unless defined $name
129 4 15 if ($_[1]->content =~ /(class|role)/)
141 4 5 unless ($$cur_pkg{'name'})
161 1 16 if ($ma_node2->content =~ /[\n|;]/)
170 2 14 if (ref $attrs eq 'ARRAY') { }
192 1 3 if ($$mpn_cur_pkg{'name'})