Branch Coverage

blib/lib/macro.pm
Criterion Covered Total %
branch 70 74 94.5


line true false branch
11 2 7 $ENV{'PERL_MACRO_DEBUG'} ? :
37 3 17 unless @_
58 2 44 unless (defined $name and defined $macro)
62 2 42 if (&Scalar::Util::tainted($name) or &Scalar::Util::tainted($macro))
67 1 41 if (exists $$self{$name})
72 40 2 if (ref $macro eq 'CODE')
80 0 40 if $@
82 38 2 $optimize ? :
92 2 38 if (ref $cv->START eq 'B::NULL') { }
93 1 1 $cv->XSUB ? :
100 2 36 if ($src =~ s/\A ( [^\{]+ ) //msx)
102 1 1 if ($s =~ /( \( .+ \) )/msx)
105 1 1 if ($s =~ /(: \s+ \w+)/msx)
118 162 409 if $it->isa('PPI::Token::Whitespace') and $it->content eq "\n"
121 39 1 if $it->isa('PPI::Token::Structure') and $it->content eq ';' and not $it->parent->snext_sibling
125 20 350 if $it->isa('PPI::Statement::Package')
128 0 350 if $it->isa('PPI::Statement::Scheduled')
131 292 58 unless $it->isa('PPI::Statement::Include') and $it->type eq 'use'
142 31 6 if (@stmt == 1 and ref $stmt[0] eq 'PPI::Statement' and not $stmt[0]->find_any(\&_want_not_simple))
197 4388 6 if (defined $rv) { }
198 104 4284 if $rv
200 908 3480 if ($elem->can('children'))
202 341 567 if ($elem->can('start')) { }
226 6 3567 if ($$elem{'enable'})
229 382 3191 if ($$doc{'skip'})
235 6 3185 if ($elem->isa('PPI::Statement::UnmatchedBrace'))
243 64 3121 if ($elem->isa('PPI::Token::Word') and exists $$macro{$elem->content})
247 1 54 if $sibling and $sibling->isa('PPI::Token::Operator') and $sibling->content eq '->'
265 92 0 if $element
279 25 34 if (my $expr = $args_list->schild(0))
284 31 58 if ($it->isa('PPI::Token::Operator') and $it->content eq ',' || $it->content eq '=>') { }
294 25 0 if ($arg != $args[-1])
323 4 817 if $elem->isa('PPI::Token::ArrayIndex') and $elem->content eq '$#_'
325 770 47 unless $elem->isa('PPI::Token::Magic')
327 5 42 if $elem->content eq '@_'
357 5 40 if ($param->content eq '@_') { }
4 36 elsif ($param->content eq '$#_') { }