Condition Coverage

blib/lib/Template/Sandbox.pm
Criterion Covered Total %
condition 192 225 85.3


and 3 conditions

line !l l&&!r l&&r condition
617 416 0 1 $^W and $$local_functions{$name}
645 19 0 1 $^W and not $$local_functions{$name}
702 15 0 1 $^W and $$local_syntaxes{$name}
913 4 0 0 $cache->can('set_takes_named_param') and $cache->set_takes_named_param
1031 18 2 2 $$self{'cache'} and not $$self{'ignore_module_dependencies'}
1116 1413 2 2 $$self{'cache'} and not $$self{'ignore_module_dependencies'}
1174 103 0 23 $$self{'template'} and ref $$self{'template'} eq 'HASH'
103 0 23 $$self{'template'} and ref $$self{'template'} eq 'HASH' and $$self{'template'}{'files'}
1328 6 0 4 exists $$ref{$var} and ref $value
6 4 0 exists $$ref{$var} and ref $value and ref $value eq 'HASH' || ref $value eq 'ARRAY'
1725 1053 354 976 $$syntax{'zero_width'} and $i < @hunks - 1
1407 976 0 $$syntax{'zero_width'} and $i < @hunks - 1 and !@compiled || $compiled[@compiled - 1][0] == 0 && $compiled[@compiled - 1][2] =~ /\n\ *$/ || $compiled[@compiled - 1][0] == 7
551 367 58 $$syntax{'zero_width'} and $i < @hunks - 1 and !@compiled || $compiled[@compiled - 1][0] == 0 && $compiled[@compiled - 1][2] =~ /\n\ *$/ || $compiled[@compiled - 1][0] == 7 and $hunks[$i + 1] =~ /^\n\ */
1766 754 237 1 $$expr[0] == 100 && $$expr[2] eq '='
1800 254 60 1 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1834 63 92 1 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1849 30 162 156 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
192 155 1 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif' and $nest_stack[0][0] ne 'else'
2073 3421 13 23 $$pos[4] and $offset_index < @{$$pos[4];} - 1
3434 5 18 $$pos[4] and $offset_index < @{$$pos[4];} - 1 and $$pos[4][$offset_index + 1][0] <= $$pos[3]
2195 2383 780 212 $$program[$i][0] == 2 and $$program[$i][2][0] == 0
2209 2714 567 94 $$program[$i][0] == 4 and $$program[$i][3][0] == 0
2626 0 321 0 $i < 3 || $weight <= $operators{$$arr[$i - 2]}[0] and $i >= @{$arr;} - 2 || $weight <= $operators{$$arr[$i + 2]}[0]
1 163 157 $i < 3 || $weight <= $operators{$$arr[$i - 2]}[0] and $i >= @{$arr;} - 2 || $weight <= $operators{$$arr[$i + 2]}[0] and $$lhs[0] == 0
164 78 79 $i < 3 || $weight <= $operators{$$arr[$i - 2]}[0] and $i >= @{$arr;} - 2 || $weight <= $operators{$$arr[$i + 2]}[0] and $$lhs[0] == 0 and $$rhs[0] == 0
2679 513 1305 277 @segments == 1 and ref $segments[0]
2738 1652 0 1390 $chain and ($segment, $chain) = $chain =~ /$capture_chained_operation_subscript_regexp/
2828 102 14 208 $$self{'local_functions'} and $$self{'local_functions'}{$func}
2886 666 57 687 defined $arglist and length $arglist
723 0 687 defined $arglist and length $arglist and ($nextarg, $arglist) = $arglist =~ /$capture_expr_comma_remain_regexp/
2957 30 1 175 $$self{'local_functions'} and $$self{'local_functions'}{$$expr[2]}
3076 0 479 165 $last >= 1 and $$special_values{$stem}
479 5 160 $last >= 1 and $$special_values{$stem} and exists $special_values_names{$$segments[1]}
3120 10 0 5 $$special_values{$stem} and exists $special_values_names{$leaf}
3182 71 0 33 $$self{'local_functions'} and $$self{'local_functions'}{$func}

or 2 conditions

line l !l condition
592 22 374 $$self{'local_functions'} ||= {}
669 9 17 $$self{'local_syntaxes'} ||= {'.next_instr', -1000000, '.instr_increment', -1, '.instr', {}}
673 9 17 $$self{'local_token_aliases'} ||= {}
800 1 35 $param{$param_name} ||= []
1632 65 1374 $$self{'open_delimiter'} || '<:'
1633 65 1374 $$self{'close_delimiter'} || ':>'
1638 9 1430 $$self{'local_token_aliases'} || {}
1639 9 1430 $$self{'local_syntaxes'} || {}
1689 2151 232 $1 || 'expr'
3021 8 8 !$self->_eval_expression($expr, 1) || 0
3023 24 24 !$self->_eval_expression($expr, 1) || 0
3436 6 0 $$line[2] || {}

or 3 conditions

line l !l&&r !l&&!r condition
610 2 0 2 ref $func || "'${func}'"
416 1 4 ref $func eq 'ARRAY' or ref $func eq 'CODE'
691 2 0 2 ref $syntax || "'${syntax}'"
780 2 1474 0 ref $this || $this
913 4 0 4 $cache->isa('Cache::CacheFactory') or $cache->can('set_takes_named_param') and $cache->set_takes_named_param
1328 2 2 0 ref $value eq 'HASH' || ref $value eq 'ARRAY'
1529 12 19 0 $$self{'local_syntaxes'}{$type} || $syntaxes{$type}
1553 4 2 27 $words[$count] =~ /^\"/ or $words[$count] =~ /=\"/
1719 12 1333 1038 $$local_syntaxes{$token} || $syntaxes{$token}
1725 55 1 551 !@compiled || $compiled[@compiled - 1][0] == 0 && $compiled[@compiled - 1][2] =~ /\n\ *$/ || $compiled[@compiled - 1][0] == 7
1740 1038 1 1329 $token eq 'expr' or $token eq 'var'
199 153 977 $token eq 'if' or $token eq 'unless'
194 122 661 $token eq 'elsif' or $token eq 'elsunless'
265 84 155 $token eq 'endif' or $token eq 'endunless'
1800 1 0 315 not @nest_stack or $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1834 1 0 156 not @nest_stack or $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1849 1 0 348 not @nest_stack or $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif' and $nest_stack[0][0] ne 'else'
1866 314 155 0 $$last[0] eq 'elsif' or $$last[0] eq 'else'
1900 1 1 60 not @nest_stack or $nest_stack[0][0] ne 5
2263 515 567 2231 $$line[0] == 3 or $$line[0] == 4
1082 60 2171 $$line[0] == 3 or $$line[0] == 4 or $$line[0] == 5
627 60 2111 $$line[0] == 3 or $$line[0] == 4 or $$line[0] == 5 or $$line[0] == 6
2274 997 901 83 $$program[$i][0] != 0 or $$program[$i - 1][0] != 0
2345 1 30 2 ref $$segments[1] or exists $special_values_names{$$segments[1]}
2473 93 10 332 ($instr = $$line[0]) == 3 or $instr == 4
103 15 317 ($instr = $$line[0]) == 3 or $instr == 4 or $instr == 5
25 15 302 ($instr = $$line[0]) == 3 or $instr == 4 or $instr == 5 or $instr == 6
2626 320 1 0 $i < 3 || $weight <= $operators{$$arr[$i - 2]}[0]
320 0 1 $i >= @{$arr;} - 2 || $weight <= $operators{$$arr[$i + 2]}[0]
2985 3376 8 10 defined $val or $undef_ok
3384 0 10 defined $val or $undef_ok or $$expr[1] eq 'undef'
3524 29 0 0 $instr_names{$$line[0]} || $$line[0]