Branch Coverage

lib/Petal/CodeGenerator.pm
Criterion Covered Total %
branch 51 74 68.9


line true false branch
15 0 500 unless @_ == 2
125 198 0 unless $Petal::WARN_UNINIT
165 534 736 if ($Petal::CodeGenerator::token =~ /$PI_RE/s) { }
174 500 494 if defined $Petal::CodeGenerator::token_hash{$key}
180 53 481 if (/^attr$/)
181 71 410 if (/^include$/)
182 204 206 if (/^var$/)
183 59 147 if (/^if$/)
184 0 147 if (/^condition$/)
185 0 147 if (/^else$/)
186 2 145 if (/^repeat$/)
187 0 145 if (/^loop$/)
188 0 145 if (/^foreach$/)
189 30 115 if (/^for$/)
190 6 109 if (/^eval$/)
191 6 103 if (/^endeval$/)
192 4 99 if (/^defslot$/)
195 99 0 if (/^end$/)
242 8 61 defined $lang && $lang ? :
246 0 69 if $Petal::ERROR_ON_INCLUDE_ERROR
265 0 4 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
267 0 4 unless defined $variable and $variable
289 0 4 defined $lang && $lang ? :
293 0 4 if $Petal::ERROR_ON_INCLUDE_ERROR
316 0 204 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
318 0 204 unless defined $variable and $variable
343 0 59 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
345 0 59 unless defined $variable and $variable
379 0 6 unless my $variable = $Petal::CodeGenerator::token_hash{'errormsg'}
407 0 53 unless my $attribute = $Petal::CodeGenerator::token_hash{'name'}
410 0 53 unless my $variable = $Petal::CodeGenerator::token_hash{'value'}
412 0 53 unless defined $variable and $variable
455 0 32 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
457 0 32 unless defined $variable and $variable
464 0 32 unless defined $as and defined $variable
474 3 29 if (defined $Petal::CodeGenerator::my_array->{$idt}) { }
549 545 2088 if @tags