Condition Coverage

blib/lib/Template/Sluz.pm
Criterion Covered Total %
condition 122 179 68.1


and 3 conditions

line !l l&&!r l&&r condition
96 234 1 9 @_ == 1 and ref $_[0] eq "HASH"
183 0 0 1 defined $open and defined $close
216 0 0 128 defined $needle and defined $haystack
230 0 0 10 $elem =~ /^\d+$/u and $elem < @$arr
280 1 67 5 length $str and substr($str, 0, 1) eq $char
442 0 13 0 $tf and not -r $tf
535 268 248 26 $is_open and $has_len
630 0 0 0 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1
0 0 0 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1 and $block =~ /$var_re/u
659 116 51 69 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1
167 7 62 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1 and $block =~ /$var_re/u
674 127 1 46 substr($block, 0, $self->{'_tag_if_len'}) eq $self->{'_tag_if'} and substr($block, -$self->{'_tag_if_close_len'}) eq $self->{'_tag_if_close'}
697 73 7 60 substr($str, 0, 2) eq "$od\$" and $str =~ /$self->{'_re_var_full'}/u
702 79 1 0 substr($str, 0, $self->{'_tag_if_len'}) eq $self->{'_tag_if'} and substr($str, -$self->{'_tag_if_close_len'}) eq $self->{'_tag_if_close'}
708 41 0 39 substr($str, 0, $self->{'_tag_foreach_len'}) eq $self->{'_tag_foreach'} and $str =~ /$self->{'_re_foreach'}/u
718 25 0 7 substr($str, 0, $self->{'_tag_literal_len'}) eq $self->{'_tag_literal'} and $str =~ /$self->{'_re_literal'}/u
769 48 6 6 $is_nothing and $is_default
6 45 3 not $is_nothing and $is_default
833 36 7 2 $self->{'auto_escape'} and not $seen_noescape
43 1 1 $self->{'auto_escape'} and not $seen_noescape and not $seen_escape
913 7 3 30 substr($bs, 0, 2) eq "$od\$" and index($bs, "|") == -1
10 0 30 substr($bs, 0, 2) eq "$od\$" and index($bs, "|") == -1 and $bs =~ /$self->{'_re_var_simple'}/u
4 0 6 substr($bs, 0, $self->{'_tag_if_len'}) eq $self->{'_tag_if'} and substr($bs, -$self->{'_tag_if_close_len'}) eq $self->{'_tag_if_close'}
931 32 4 1 ref $src ne "ARRAY" and ref $src ne "HASH"
1120 0 0 9 -f $inc_tpl and -r $inc_tpl
1154 2 0 14 defined $ret and !ref($ret) || ref $ret eq ''
1223 136 0 10 $first eq "'" and $last eq "'"
1228 120 0 16 $first eq "\"" and $last eq "\""
1230 3 0 13 index($tmp, "\$") == -1 and index($tmp, "\"") == -1
1241 45 0 3 $str =~ /^(\w+)$/u and exists $self->{'tpl_vars'}{$1}
1245 45 0 0 $str =~ /^!(\w+)$/u and exists $self->{'tpl_vars'}{$1}

or 2 conditions

line l !l condition
51 3 1 shift() // ", "
67 0 11 $args{'debug'} // 0
2 9 $args{'auto_escape'} // 0
117 3 0 shift() || ''
161 210 0 shift() // ""
245 32 0 shift() // ""
277 73 0 shift() // ""
289 0 15 shift() // ""
323 21 0 shift() // ""
333 165 0 shift() // ""
413 1 0 $file || __FILE__
428 13 0 shift() // ""
451 4 9 $str // ""
475 317 0 shift() // ""
591 354 0 $blocks[$i][0] // ""
688 140 0 shift() // ""
689 140 0 shift() // -1
776 3 0 $self->array_dive($key, $self->{'tpl_vars'}) // ""
781 45 0 $self->array_dive($key, $self->{'tpl_vars'}) // ""
791 49 0 $x[0] // ""
794 15 34 $x[1] // ""
863 11 20 $1 // ""
864 31 0 $2 // ""
1174 97 0 shift() // ""
1216 165 0 shift() // ""
1254 165 0 shift() // ""
1330 8 2 shift() // ""
1392 52 46 $self->is_if_token($item) || 0

or 3 conditions

line l !l&&r !l&&!r condition
187 0 0 1 length $open != 1 or length $close != 1
336 40 18 44 index($str, $self->{'_tag_if'}) == 0 or index($str, $self->{'_tag_elseif'}) == 0
501 276 266 284 $is_open or $is_closed
592 54 39 261 index($bstr, $tag_if) == 0 || index($bstr, $tag_foreach) == 0
766 11 1 48 !defined($tmp) || defined $tmp && ref $tmp eq '' && !length($tmp) && $tmp ne '0'
812 42 7 0 defined &{"main::$func";} || defined &{$func;} || defined &{"CORE::$func";}
880 31 32 0 $self->{'_convert_cache'}{$raw} // $self->_convert_vars($raw)
1154 14 0 0 !ref($ret) || ref $ret eq ''
1160 1 1 14 $err or not $valid
1335 0 0 10 $pos < 0 or not defined $str