Branch Coverage

blib/lib/PPIx/Utilities/Node.pm
Criterion Covered Total %
branch 29 32 90.6


line true false branch
36 2 8 if (my $single_namespace = _split_ppi_node_by_namespace_single($node))
55 1 9 unless ($package_statements and @{$package_statements;})
59 6 3 if (@{$package_statements;} == 1)
65 1 5 if ($package_address == refaddr $node or $first_child and $package_address == refaddr $first_child)
87 10 8 if ($initial_fragment)
92 20 131 if ($child->isa('PPI::Statement::Package')) { }
10 121 elsif ($child->isa('PPI::Statement::Compound') or $child->isa('PPI::Statement::Given') or $child->isa('PPI::Statement::When')) { }
93 19 1 if ($fragment)
108 10 34 if ($component->isa('PPI::Structure::Block'))
113 10 0 if ($block)
114 1 9 unless ($fragment)
132 125 26 if ($initial_fragment_address != refaddr $fragment)
135 0 125 unless $child->remove
139 0 125 unless $fragment->add_element($child)
154 22 130 unless ($fragment = $$scope_fragments_by_namespace{$namespace})
172 22 19 if (not @{$nodes;} or refaddr($$nodes[-1]) != refaddr $fragment)