Condition Coverage

lib/Template/Sluz.pm
Criterion Covered Total %
condition 89 131 67.9


and 3 conditions

line !l l&&!r l&&r condition
84 29 1 2 @_ == 1 and ref $_[0] eq "HASH"
166 0 0 167 defined $needle and defined $haystack
180 0 0 10 $elem =~ /^\d+$/u and $elem < @$arr
197 1 59 5 length $str and substr($str, 0, 1) eq $char
300 0 13 0 $tf and not -r $tf
381 223 195 33 $is_open and $has_len
476 111 7 147 substr($str, 0, 2) eq "{\$" and $str =~ m[^\{\$([\w|.'";\t :,!\@#%^&*?_/\\\-]+)\}$]u
481 66 1 51 substr($str, 0, 4) eq "{if " and substr($str, -5) eq "{/if}"
486 37 0 30 substr($str, 0, 9) eq "{foreach " and $str =~ m[^\{foreach (\$\w[\w.]*) as \$(\w+)(?: => \$(\w+))?\}(.+)\{/foreach\}$]su
496 23 0 5 substr($str, 0, 9) eq "{literal}" and $str =~ m[^\{literal\}(.+)\{/literal\}$]su
531 20 4 4 $is_nothing and $is_default
4 17 3 not $is_nothing and $is_default
647 25 2 1 ref $src ne "ARRAY" and ref $src ne "HASH"
735 0 0 9 -f $inc_tpl and -r $inc_tpl
769 2 0 12 defined $ret and !ref($ret) || ref $ret eq ''
827 113 0 10 $first eq "'" and $last eq "'"
832 99 0 14 $first eq "\"" and $last eq "\""
834 3 0 11 index($tmp, "\$") == -1 and index($tmp, "\"") == -1
845 38 0 3 $str =~ /^(\w+)$/u and exists $self->{'tpl_vars'}{$1}
849 38 0 0 $str =~ /^!(\w+)$/u and exists $self->{'tpl_vars'}{$1}

or 2 conditions

line l !l condition
51 3 1 shift() // ", "
99 3 0 shift() || ''
143 154 0 shift() // ""
194 65 0 shift() // ""
206 0 14 shift() // ""
240 19 0 shift() // ""
248 153 0 shift() // ""
271 1 0 $file || __FILE__
286 13 0 shift() // ""
309 4 9 $str // ""
333 257 0 shift() // ""
432 323 0 $blocks[$i][0] // ""
470 265 0 shift() // ""
471 265 0 shift() // -1
538 3 0 $self->array_dive($key, $self->{'tpl_vars'}) // ""
543 17 0 $self->array_dive($key, $self->{'tpl_vars'}) // ""
550 18 0 $x[0] // ""
551 15 3 $x[1] // ""
610 32 0 $1 // ""
611 32 0 $2 // ""
789 119 0 shift() // ""
820 139 0 shift() // ""
858 139 0 shift() // ""
920 9 1 shift() // ""
978 50 40 $self->is_if_token($item) || 0

or 3 conditions

line l !l&&r !l&&!r condition
347 230 221 247 $is_open or $is_closed
433 46 30 247 $bstr =~ /^\{if\b/u || $bstr =~ /^\{for/u
528 7 1 20 !defined($tmp) || defined $tmp && ref $tmp eq '' && !length($tmp) && $tmp ne '0'
569 16 2 0 defined &{"main::$func";} || defined &{$func;} || defined &{"CORE::$func";}
769 12 0 0 !ref($ret) || ref $ret eq ''
775 1 1 12 $err or not $valid
925 0 0 10 $pos < 0 or not defined $str