Branch Coverage

lib/Petal/CodeGenerator.pm
Criterion Covered Total %
branch 49 70 70.0


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 ? :
263 0 4 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
265 0 4 unless defined $variable and $variable
287 0 4 defined $lang && $lang ? :
312 0 204 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
314 0 204 unless defined $variable and $variable
339 0 59 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
341 0 59 unless defined $variable and $variable
375 0 6 unless my $variable = $Petal::CodeGenerator::token_hash{'errormsg'}
403 0 53 unless my $attribute = $Petal::CodeGenerator::token_hash{'name'}
406 0 53 unless my $variable = $Petal::CodeGenerator::token_hash{'value'}
408 0 53 unless defined $variable and $variable
451 0 32 unless my $variable = $Petal::CodeGenerator::token_hash{'name'}
453 0 32 unless defined $variable and $variable
460 0 32 unless defined $as and defined $variable
470 29 3 if (not defined $Petal::CodeGenerator::my_array->{$idt}) { }
545 545 2088 if @tags