Condition Coverage

blib/lib/Template/Sandbox.pm
Criterion Covered Total %
condition 188 233 80.6


and 3 conditions

line !l l&&!r l&&r condition
608 415 0 1 $^W and $$local_functions{$name}
636 19 0 1 $^W and not $$local_functions{$name}
693 15 0 1 $^W and $$local_syntaxes{$name}
898 0 0 0 $cache->can('set_takes_named_param') and $cache->set_takes_named_param
1001 18 0 0 $$self{'cache'} and $$self{'template'} = $$self{'cache'}->get($cache_key = $self->cache_key($defines))
1011 18 0 0 $$self{'cache'} and not $$self{'ignore_module_dependencies'}
1071 1413 0 0 $$self{'cache'} and $$self{'template'} = $$self{'cache'}->get($cache_key = $self->cache_key($defines))
1081 1413 0 0 $$self{'cache'} and not $$self{'ignore_module_dependencies'}
1135 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'}
1298 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'
1695 1045 354 976 $$syntax{'zero_width'} and $i < @hunks - 1
1399 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\ */
1736 746 237 1 $$expr[0] == 100 && $$expr[2] eq '='
1770 254 60 1 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1804 63 92 1 $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1819 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'
2043 3405 13 23 $$pos[4] and $offset_index < @{$$pos[4];} - 1
3418 5 18 $$pos[4] and $offset_index < @{$$pos[4];} - 1 and $$pos[4][$offset_index + 1][0] <= $$pos[3]
2165 2375 780 204 $$program[$i][0] == 2 and $$program[$i][2][0] == 0
2179 2698 567 94 $$program[$i][0] == 4 and $$program[$i][3][0] == 0
2596 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
2649 513 1305 277 @segments == 1 and ref $segments[0]
2707 1652 0 1390 $chain and ($segment, $chain) = $chain =~ /$capture_chained_operation_subscript_regexp/
2796 94 14 208 $$self{'local_functions'} and $$self{'local_functions'}{$func}
2854 666 49 687 defined $arglist and length $arglist
715 0 687 defined $arglist and length $arglist and ($nextarg, $arglist) = $arglist =~ /$capture_expr_comma_remain_regexp/
2925 30 1 175 $$self{'local_functions'} and $$self{'local_functions'}{$$expr[2]}
3044 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]}
3088 10 0 5 $$special_values{$stem} and exists $special_values_names{$leaf}
3150 63 0 33 $$self{'local_functions'} and $$self{'local_functions'}{$func}

or 2 conditions

line l !l condition
583 22 374 $$self{'local_functions'} ||= {}
660 9 17 $$self{'local_syntaxes'} ||= {'.next_instr', -1000000, '.instr_increment', -1, '.instr', {}}
664 9 17 $$self{'local_token_aliases'} ||= {}
789 1 35 $param{$param_name} ||= []
965 1 0 $$keys{$_} || ''
1602 65 1366 $$self{'open_delimiter'} || '<:'
1603 65 1366 $$self{'close_delimiter'} || ':>'
1608 9 1422 $$self{'local_token_aliases'} || {}
1609 9 1422 $$self{'local_syntaxes'} || {}
1659 2143 232 $1 || 'expr'
2989 8 8 !$self->_eval_expression($expr, 1) || 0
2991 24 24 !$self->_eval_expression($expr, 1) || 0
3404 6 0 $$line[2] || {}

or 3 conditions

line l !l&&r !l&&!r condition
601 2 0 2 ref $func || "'${func}'"
415 1 4 ref $func eq 'ARRAY' or ref $func eq 'CODE'
682 2 0 2 ref $syntax || "'${syntax}'"
770 2 1458 0 ref $this || $this
898 0 0 0 $cache->isa('Cache::CacheFactory') or $cache->can('set_takes_named_param') and $cache->set_takes_named_param
1298 2 2 0 ref $value eq 'HASH' || ref $value eq 'ARRAY'
1499 12 19 0 $$self{'local_syntaxes'}{$type} || $syntaxes{$type}
1523 4 2 27 $words[$count] =~ /^\"/ or $words[$count] =~ /=\"/
1689 12 1333 1030 $$local_syntaxes{$token} || $syntaxes{$token}
1695 55 1 551 !@compiled || $compiled[@compiled - 1][0] == 0 && $compiled[@compiled - 1][2] =~ /\n\ *$/ || $compiled[@compiled - 1][0] == 7
1710 1030 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'
1770 1 0 315 not @nest_stack or $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1804 1 0 156 not @nest_stack or $nest_stack[0][0] ne 'if' and $nest_stack[0][0] ne 'elsif'
1819 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'
1836 314 155 0 $$last[0] eq 'elsif' or $$last[0] eq 'else'
1870 1 1 60 not @nest_stack or $nest_stack[0][0] ne 5
2233 515 567 2215 $$line[0] == 3 or $$line[0] == 4
1082 60 2155 $$line[0] == 3 or $$line[0] == 4 or $$line[0] == 5
627 60 2095 $$line[0] == 3 or $$line[0] == 4 or $$line[0] == 5 or $$line[0] == 6
2244 997 901 75 $$program[$i][0] != 0 or $$program[$i - 1][0] != 0
2315 1 30 2 ref $$segments[1] or exists $special_values_names{$$segments[1]}
2443 93 10 324 ($instr = $$line[0]) == 3 or $instr == 4
103 15 309 ($instr = $$line[0]) == 3 or $instr == 4 or $instr == 5
25 15 294 ($instr = $$line[0]) == 3 or $instr == 4 or $instr == 5 or $instr == 6
2596 320 1 0 $i < 3 || $weight <= $operators{$$arr[$i - 2]}[0]
320 0 1 $i >= @{$arr;} - 2 || $weight <= $operators{$$arr[$i + 2]}[0]
2953 3376 8 10 defined $val or $undef_ok
3384 0 10 defined $val or $undef_ok or $$expr[1] eq 'undef'
3492 29 0 0 $instr_names{$$line[0]} || $$line[0]