Condition Coverage

blib/lib/Text/Xslate/Compiler.pm
Criterion Covered Total %
condition 67 89 75.2


and 3 conditions

line !l l&&!r l&&r condition
354 0 46015 1954 defined $file and $file ne $self->current_file
495 124 44 0 $c->[0] eq 'print_raw_s' and $c->[1] =~ / [^ \t\r\n] /msx
642 279 3 27 $node->arity eq 'call' && $maybe_name->arity eq 'name' && @{$node->second;} == 1 && any_in($maybe_name->id, ('raw', 'mark_raw', 'html')) && !$self->overridden_builtin->{$maybe_name->id}
652 10276 2359 28 $proc eq 'print' and $self->type eq 'text'
657 10308 2386 0 $proc eq 'print' and $self->overridden_builtin->{'html_escape'}
2381 20 10288 exists $Text::Xslate::OPS{$proc . '_s'} and $arg->arity eq 'literal'
881 6 2 2 $self->{'in_loop'} == 1 and $type eq 'last'
966 203 49 167 $expr->is_logical and any_in($expr->id, ('==', '!='))
1019 7 69 217 @then and @else
1130 0 16 17 $OPTIMIZE and $self->_code_is_literal(@operand)
1157 0 40 14 $OPTIMIZE and $self->_code_is_literal(@rhs)
1202 558 35 123 $self->_code_is_literal(@lhs) and $self->_code_is_literal(@rhs)
1256 400 4 54 my $intern = $builtin{$callable->id} and not $self->overridden_builtin->{$callable->id}
1350 31 9 33 @expr == 1 and any_in($expr[0][0], ('literal', 'load_lvar'))
1421 304 1051 0 @code == 1 && ($code[0][0] eq 'literal' || $code[0][0] eq 'literal_i')
1493 0 14245 5806 $j < @{$c;} and $c->[$j][0] eq 'print_raw_s'
14245 170 5636 $j < @{$c;} and $c->[$j][0] eq 'print_raw_s' and join($", @{[] unless $goto_addr[$i];}) eq join($", @{[] unless $goto_addr[$j];})
1515 0 642 594 defined $nn and $nn->[0] eq 'load_lvar_to_sb'
642 0 594 defined $nn and $nn->[0] eq 'load_lvar_to_sb' and $nn->[1] == $it->[1]

or 2 conditions

line l !l condition
279 2022 1438 $args{'file'} || \$input
465 0 23 $$mtable{$c->[1]} ||= []
943 0 76 $self->macro_table->{$fq_name} ||= []
1483 8725 13057 $goto_addr[$j] ||= []

or 3 conditions

line l !l&&r !l&&!r condition
341 17 0 84 ref $_ || $uniq{$_}++
367 21272 0 30679 $args{'line'} || (ref $symbol ? $symbol->line : undef)
384 20 0 0 $self->engine || $self->_error('No Xslate engine which header/footer requires')
408 28329 0 0 $self->can('_generate_' . $node->arity) || Carp::confess('[BUG] Unexpected node: ' . p($node))
420 74 0 0 $self->engine || $self->_error('Cannot cascade templates without Xslate engine', $cascade)
635 2381 20 0 $name eq 'print' or $name eq 'print_raw'
1019 217 0 76 @then and @else or not $OPTIMIZE
1327 0 1 58 not exists $lvar->{$lvar_name} or $lhs->arity ne 'variable'