Condition Coverage

blib/lib/Template/Sluz.pm
Criterion Covered Total %
condition 139 189 73.5


and 3 conditions

line !l l&&!r l&&r condition
97 234 1 9 @_ == 1 and ref $_[0] eq "HASH"
181 0 0 1 defined $open and defined $close
215 0 0 80 defined $needle and defined $haystack
229 0 0 10 $elem =~ /^\d+$/u and $elem < @$arr
279 1 113 15 length $str and substr($str, 0, 1) eq $char
453 0 4 0 $tf and not -r $tf
548 272 256 30 $is_open and $has_len
590 3 1 19 $pre_nl and $post_nl
4 12 7 $pre_nl and $post_nl and $after < $slen
650 6 1 13 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1
7 0 13 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1 and $block =~ /$var_re/u
666 1 0 6 substr($block, 0, $self->{'_tag_if_len'}) eq $self->{'_tag_if'} and substr($block, -$self->{'_tag_if_close_len'}) eq $self->{'_tag_if_close'}
686 114 50 56 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1
164 7 49 substr($block, 0, 2) eq $var_tag and index($block, "|") == -1 and $block =~ /$var_re/u
701 126 1 44 substr($block, 0, $self->{'_tag_if_len'}) eq $self->{'_tag_if'} and substr($block, -$self->{'_tag_if_close_len'}) eq $self->{'_tag_if_close'}
724 73 7 60 substr($str, 0, 2) eq "$od\$" and $str =~ /$self->{'_re_var_full'}/u
729 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'}
735 41 0 39 substr($str, 0, $self->{'_tag_foreach_len'}) eq $self->{'_tag_foreach'} and $str =~ /$self->{'_re_foreach'}/u
745 25 0 7 substr($str, 0, $self->{'_tag_literal_len'}) eq $self->{'_tag_literal'} and $str =~ /$self->{'_re_literal'}/u
797 48 6 6 $is_nothing and $is_default
6 45 3 not $is_nothing and $is_default
860 36 7 2 $self->{'auto_escape'} and not $seen_noescape
43 1 1 $self->{'auto_escape'} and not $seen_noescape and not $seen_escape
942 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'}
960 32 4 1 ref $src ne "ARRAY" and ref $src ne "HASH"
1149 0 0 9 -f $inc_tpl and -r $inc_tpl
1183 2 0 14 defined $ret and !ref($ret) || ref $ret eq ''
1252 143 0 10 $first == 39 and $last == 39
1257 127 0 16 $first == 34 and $last == 34
1259 3 0 13 index($tmp, "\$") == -1 and index($tmp, "\"") == -1
1262 36 14 80 $str =~ /^(!?)\$__S->\{sluz_pfx_(\w+)\}$/u and exists $self->{'tpl_vars'}{$2}
1266 47 0 3 $str =~ /^(!?)(\w+)$/u and exists $self->{'tpl_vars'}{$2}

or 2 conditions

line l !l condition
51 3 1 shift() // ", "
67 0 11 $args{'debug'} // 0
2 9 $args{'auto_escape'} // 0
118 3 0 shift() // "INLINE_TEMPLATE"
159 220 0 shift() // ""
244 32 0 shift() // ""
276 129 0 shift() // ""
288 0 23 shift() // ""
322 24 0 shift() // ""
332 195 0 shift() // ""
421 1 0 $file || __FILE__
426 4 0 shift() // ""
462 4 0 $str // ""
488 331 0 shift() // ""
612 370 0 $blocks[$i][0] // ""
715 140 0 shift() // ""
716 140 0 shift() // -1
804 3 0 $tmp // ""
820 49 0 $x[0] // ""
823 15 34 $x[1] // ""
890 11 21 $1 // ""
891 32 0 $2 // ""
1203 97 0 shift() // ""
1245 173 0 shift() // ""
1275 173 0 shift() // ""
1351 1 9 shift() // ""
1421 61 55 $self->is_if_token($item) || 0

or 3 conditions

line l !l&&r !l&&!r condition
185 0 0 1 length $open != 1 or length $close != 1
335 46 24 53 index($str, $self->{'_tag_if'}) == 0 or index($str, $self->{'_tag_elseif'}) == 0
514 288 270 293 $is_open or $is_closed
588 14 6 3 $i == 0 || substr($str, $i - 1, 1) eq "\n"
589 13 7 3 $after >= $slen || substr($str, $after, 1) eq "\n"
613 58 39 273 index($bstr, $tag_if) == 0 || index($bstr, $tag_foreach) == 0
794 11 1 48 !defined($tmp) || defined $tmp && ref $tmp eq '' && !length($tmp) && $tmp ne '0'
907 38 32 0 $self->{'_convert_cache'}{$raw} // $self->_convert_vars($raw)
1183 14 0 0 !ref($ret) || ref $ret eq ''
1189 1 1 14 $err or not $valid
1364 0 0 1 $pos < 0 or not defined $str