Condition Coverage

blib/lib/Text/BasicTemplate.pm
Criterion Covered Total %
condition 142 275 51.6


and 2 conditions

line l !l condition
980 171 0 $debug and print STDERR ' -- op'
1623 14 0 $x eq '""' and $x = ''

and 3 conditions

line !l l&&!r l&&r condition
873 0 585 2 $$self{'compatibility_mode_0x'} and $d =~ /^([\w\.\-]+)=(.*)/s
892 0 145 0 $$self{'max_parse_recursion'} and $$ovr{'_bt_recurse_count'} > $$self{'max_parse_recursion'}
899 97 0 0 $$self{'use_scalarref_lexicon_cache'} and defined $$self{'lexicon_cache'}{$isrc}
910 48 0 0 $$self{'use_scalarref_lexicon_cache'} and defined $$self{'lexicon_cache'}{$isrc}
967 0 0 174 defined $start_pos and defined $end_pos
0 0 174 defined $start_pos and defined $end_pos and $end_pos >= $start_pos
974 174 0 366 $i <= $end_pos and $i <= $#{$L;}
999 84 4 45 $$lexeme[2] == 1 and $$lexeme[1] =~ /^%(else|(if|elsif)\s+([^%]+))%$/
1009 1 0 77 $i1 <= $#{$L;} and $$L[$i1][0] >= $$lexeme[0]
1 0 77 $i1 <= $#{$L;} and $$L[$i1][0] >= $$lexeme[0] and $i1 <= $end_pos
1018 11 49 17 $$L[$i1][0] == $$L[$i][0] and $$L[$i1][1] eq '%fi%'
11 40 9 $$L[$i1][0] == $$L[$i][0] and $$L[$i1][1] eq '%else%'
1030 0 0 41 $i1 + $i2 <= $end_pos and $i1 + $i2 <= $#{$L;}
0 7 34 $i1 + $i2 <= $end_pos and $i1 + $i2 <= $#{$L;} and defined $$L[$i1 + $i2 + 1][0]
7 4 30 $i1 + $i2 <= $end_pos and $i1 + $i2 <= $#{$L;} and defined $$L[$i1 + $i2 + 1][0] and $$L[$i1 + $i2 + 1][0] >= $$L[$i1][0]
1045 0 0 29 $s and ref $s eq 'SCALAR'
1058 0 0 34 $$L[$i1][0] >= $$lexeme[0] and $i1 <= $end_pos
0 18 16 $$L[$i1][0] == $$L[$i][0] && $$L[$i1][1] =~ /^%(elsif\s|fi%|else%)/
16 0 18 not $$L[$i1][0] == $$L[$i][0] && $$L[$i1][1] =~ /^%(elsif\s|fi%|else%)/ and $i1 <= $#{$L;}
0 34 0 $$L[$i1][0] >= $$lexeme[0] and $i1 <= $end_pos and (not $$L[$i1][0] == $$L[$i][0] && $$L[$i1][1] =~ /^%(elsif\s|fi%|else%)/ and $i1 <= $#{$L;})
1064 0 16 0 $1 and $1 eq 'fi'
1099 0 131 1 $$self{'use_full_cond_cache'} and $$self{'fullcond_cache'}{"$ovr\t$cond"}
1107 0 109 22 $$self{'use_cond2rpn_cache'} and $$self{'cond2rpn_cache'}{$cond}
1268 56 0 2 $op eq '=~' and $$self{'enable_pattern_operator'}
53 0 3 $op eq '!~' and $$self{'enable_pattern_operator'}
17 0 2 $op eq '/' and $operand
16 0 1 $op eq 'div' and $operand
15 0 1 $op eq 'mod' and $operand
1303 0 2 9 $lvalue && $operand
1402 200 0 38 defined $type and $name
1475 0 0 22 $name and $ovr
1508 9 1 6 @real_args and not +($#real_args + 1) % 2
1510 0 0 1 ref $$ovr{$name} eq 'ARRAY' and $#{$$ovr{$name};} == 2
0 0 1 ref $$ovr{$name} eq 'ARRAY' and $#{$$ovr{$name};} == 2 and ref $$ovr{$name}[1] eq 'CODE'
1524 0 0 2 ref $$ovr{$name} eq 'ARRAY' and $#{$$ovr{$name};} == 2
1528 0 0 0 ref $buf eq 'HASH' and $use_recursive_parse
1539 1 1 0 $use_recursive_parse and ref $seg eq 'HASH'
1556 2 0 3 $use_recursive_parse and ref $seg eq 'HASH'
1575 1 1 0 $use_recursive_parse and ref $seg eq 'HASH'
1646 0 0 6 $name and $ovr
1662 1 0 5 $$self{'pragma_enable'}{$name} and ref $$self{'pragma_functions'}{$name} eq 'CODE'
1688 46 124 42 not $$self{'reserved_words'}{$$nr} and $$nr =~ /^%?([&\$]?)(\w+)%?$/
1743 0 86 84 $opcontent and not $opcontent =~ /^(if\s|elsif\s|fi$|else$)/
86 84 0 $opcontent and not $opcontent =~ /^(if\s|elsif\s|fi$|else$)/ and $opcontent =~ tr/0-9A-Z^_a-z//
1782 0 48 0 not $$self{'open_tainted_files'} and $self->is_tainted($fn)
1814 0 4 0 $type and not $file
1818 4 0 0 $parse && $parse eq 'noparse'
1820 0 0 4 $type and $type =~ /^(file|virtual|semisecure)$/
0 0 4 $type and $type =~ /^(file|virtual|semisecure)$/ and $file
1829 0 0 0 $self->is_tainted($file) and not $$self{'bt_include_allow_tainted'}
1844 2 0 0 $self->is_tainted($file) and not $$self{'bt_include_allow_tainted'}
1857 2 0 0 $self->is_tainted($file) and not $$self{'bt_include_allow_tainted'}
1884 0 0 1 $type and $type =~ /^(cmd|cgi)$/
0 0 1 $type and $type =~ /^(cmd|cgi)$/ and $command
1892 0 0 1 $parse and $buf
1905 0 0 0 $parse and $buf

or 2 conditions

line l !l condition
723 0 7 $$self{'max_parse_recursion'} ||= 32
724 0 7 $$self{'reserved_words'} ||= \%reserved_words
739 0 7 $$self{'use_scalarref_lexicon_cache'} ||= 0
761 0 7 $$self{'default_list_delimiter'} || ', '
763 0 7 $$self{'default_hash_delimiter'} || ', '
765 0 7 $$self{'default_hash_specifier'} || '='
790 0 7 $$self{'bt_include_allow_tainted'} ||= 0
805 12 30 $$self{$_} ||= 0
859 145 0 shift() || (return undef)
885 3 142 $$ovr{'_bt_recurse_count'} ||= 0
1085 132 0 shift() || []
1394 254 0 shift() || {}
1399 0 0 $type || ''
0 0 $name || ''
1447 13 3 $args ||= ''
1478 7 9 $args ||= ''
1614 11 0 shift() || (return [])
1645 6 0 $args ||= ''
1710 145 0 shift() || (return)
1724 145 0 length $$src || 0
1729 214 16 $2 || ''
212 18 $3 || ''
1779 48 0 shift() || (return undef)
1810 4 0 shift() || {}
1880 1 0 shift() || {}
1886 1 0 $parse ||= 0
1931 0 0 $start_pos || 0
1957 0 0 shift() || 0
2143 145 0 shift() || (return undef)

or 3 conditions

line l !l&&r !l&&!r condition
932 20 0 125 $$self{'strip_c_comments'} or $$self{'strip_cpp_comments'}
968 0 0 174 $end_pos < 0 or not @{$L;}
1018 9 2 49 $$L[$i1][0] == $$L[$i][0] and $$L[$i1][1] eq '%else%' or substr($$L[$i1][1], 0, 7) eq '%elsif '
1268 11 0 27 $op eq '&&' or $op eq 'and'
3 0 24 $op eq '||' or $op eq 'or'
1305 3 0 0 $lvalue || $operand
1352 2 0 0 $op eq 'defined' or $op =~ /^defined\s+/
1425 1 3 0 $$self{'list_delimiter'}{$name} || $$self{'list_delimiter'}{'__default'}
1429 0 12 0 $$self{'hash_specifier'}{$name} || $$self{'hash_specifier'}{'__default'}
1435 0 4 0 $$self{'hash_delimiter'}{$name} || $$self{'hash_delimiter'}{'__default'}
1510 5 0 1 ref $$ovr{$name} eq 'CODE' or ref $$ovr{$name} eq 'ARRAY' and $#{$$ovr{$name};} == 2 and ref $$ovr{$name}[1] eq 'CODE'
1622 6 0 8 $3 || $1
1841 2 0 0 $$self{'include_document_root'} or $ENV{'DOCUMENT_ROOT'}
1848 2 0 0 $$self{'include_document_root'} || $ENV{'DOCUMENT_ROOT'}
1931 0 0 0 $end_pos || $#{$L;}