Branch Coverage

blib/lib/Filter/Template.pm
Criterion Covered Total %
branch 80 106 75.4


line true false branch
31 2 0 unless defined &DEBUG
32 2 0 unless defined &DEBUG_INVOKE
33 2 0 unless defined &DEBUG_DEFINE
34 2 0 unless defined &WARN_DEFINE
45 0 6 if @_ == 1
50 7 13 if (exists $first{$c}) { }
61 9 4 if @{$first{$_};} == 1
85 7 6 if $num++
86 4 9 if (ref $_ eq 'ARRAY') { }
91 4 0 if (length $$_[1]) { }
101 4 0 if ($#$_ > 1)
122 15 4 if (@{$Filter::Template::conditional_stacks{$package_name};})
124 9 8 unless ($$flag[0])
138 1 2 if (@_ > 1)
154 1 2 if ($args{'isa'})
155 0 1 if (ref $args{'isa'} eq 'ARRAY') { }
166 0 1 if $@
212 2 131 if ($status <= 0)
213 0 2 if (@{$Filter::Template::conditional_stacks{$package_name};})
227 20 111 if (/\#\s*include/)
230 3 17 if (/^(\s*)if\s*\((.+)\)\s*\{\s*\#\s*include\s*$/) { }
6 11 elsif (/^\s*\}\s*\#\s*include\s*$/) { }
6 5 elsif (/^\s*\}\s*else\s*\{\s*\#\s*include\s*$/) { }
3 2 elsif (/^(\s*)unless\s*\((.+)\)\s*\{\s*\#\s*include\s*$/) { }
1 1 elsif (/^(\s*)\}\s*elsif\s*\((.+)\)\s*\{\s*\#\s*include\s*$/) { }
231 3 0 defined $1 ? :
242 0 3 if ($state & 1) { }
262 6 0 unless ($state & 1)
270 0 6 unless (@{$Filter::Template::conditional_stacks{$package_name};})
284 6 0 unless ($state & 1)
292 3 0 defined $1 ? :
303 0 3 if ($state & 1) { }
319 0 1 unless (@{$Filter::Template::conditional_stacks{$package_name};})
327 1 0 defined $1 ? :
338 0 1 if ($state & 1) { }
355 10 102 if ($Filter::Template::excluding_code{$package_name})
362 10 0 unless ($state & 1)
369 10 92 if ($state & 1)
372 5 5 if (/^\}\s*$/) { }
426 1 91 if (/^__(END|DATA)__\s*$/)
432 0 91 if ($Filter::Template::excluding_code{$package_name})
437 3 88 if (/^enum(?:\s+(\d+|\+))?\s+(.*?)\s*$/)
440 1 1 $1 eq '+' ? :
2 1 defined $1 ? :
461 2 86 if (/^const\s+(\S+)\s+(.+?)\s*$/i)
470 5 81 if (/^template\s*(\w+)\s*(?:\((.*?)\))?\s*\{\s*$/)
477 4 1 defined $2 ? :
510 5 0 if (exists $templates{$package_name}{$name}) { }
517 0 5 if (@use_params != @mac_params)
539 0 5 unless ($^P)
555 0 5 unless $^P
573 2 79 if ($const_regexp_dirty)
581 35 46 if (defined $const_regexp{$package_name})