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 45856 1958 defined $file and $file ne $self->current_file
495 122 44 0 $c->[0] eq 'print_raw_s' and $c->[1] =~ / [^ \t\r\n] /msx
642 278 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 10279 2340 28 $proc eq 'print' and $self->type eq 'text'
657 10311 2367 0 $proc eq 'print' and $self->overridden_builtin->{'html_escape'}
2362 20 10291 exists $Text::Xslate::OPS{$proc . '_s'} and $arg->arity eq 'literal'
881 6 2 2 $self->{'in_loop'} == 1 and $type eq 'last'
966 202 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 544 35 123 $self->_code_is_literal(@lhs) and $self->_code_is_literal(@rhs)
1256 399 4 54 my $intern = $builtin{$callable->id} and not $self->overridden_builtin->{$callable->id}
1350 30 9 33 @expr == 1 and any_in($expr[0][0], ('literal', 'load_lvar'))
1421 304 1036 0 @code == 1 && ($code[0][0] eq 'literal' || $code[0][0] eq 'literal_i')
1493 0 14251 5806 $j < @{$c;} and $c->[$j][0] eq 'print_raw_s'
14251 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 580 defined $nn and $nn->[0] eq 'load_lvar_to_sb'
642 0 580 defined $nn and $nn->[0] eq 'load_lvar_to_sb' and $nn->[1] == $it->[1]

or 2 conditions

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

or 3 conditions

line l !l&&r !l&&!r condition
341 16 0 84 ref $_ || $uniq{$_}++
367 21201 0 30573 $args{'line'} || (ref $symbol ? $symbol->line : undef)
384 20 0 0 $self->engine || $self->_error('No Xslate engine which header/footer requires')
408 28256 0 0 $self->can('_generate_' . $node->arity) || Carp::confess('[BUG] Unexpected node: ' . p($node))
420 73 0 0 $self->engine || $self->_error('Cannot cascade templates without Xslate engine', $cascade)
635 2362 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'