Condition Coverage

blib/lib/HTML/Template.pm
Criterion Covered Total %
condition 131 206 63.5


and 3 conditions

line !l l&&!r l&&r condition
1207 115 182 3 grep {exists $$options{$_};} 'filehandle', 'arrayref', 'scalarref' and grep {$$options{$_};} 'cache', 'blind_cache', 'file_cache', 'shared_cache', 'double_cache', 'double_file_cache'
1270 289 5 0 $$options{'open_mode'} and $] < 5.007001
1366 0 0 0 defined $$self{'param_map'} and defined $$self{'parse_stack'}
1372 0 0 0 defined $$self{'param_map'} and defined $$self{'parse_stack'}
1410 254 0 16 $$options{'cache'} and not $$options{'shared_cache'}
254 10 6 $$options{'cache'} and not $$options{'shared_cache'} and not $$options{'file_cache'}
1438 0 6 0 defined $HTML::Template::CACHE{$key}{'mtime'} and $mtime != $HTML::Template::CACHE{$key}{'mtime'}
1562 0 4 0 defined $$self{'mtime'} and $mtime != $$self{'mtime'}
1650 0 0 0 $$options{'cache_debug'} and defined $$self{'record'}
1674 0 0 0 defined $mtime and defined $c_mtime
0 0 0 defined $mtime and defined $c_mtime and $mtime != $c_mtime
1685 0 0 0 defined $mtime and defined $included_mtimes
1725 181 0 4 'File::Spec'->file_name_is_absolute($filename) and -e $filename
1884 0 0 11 defined $format and defined $sub
1890 0 0 11 ref $sub and ref $sub eq 'CODE'
2124 560 9 30 defined $$options{'default_escape'} && $which eq 'TMPL_VAR'
2157 0 1 580 defined $name && length $name
169 580 1 $need_names{$which} and not defined $name && length $name
2161 577 171 1 $escape and $which ne 'TMPL_VAR'
2165 704 43 1 defined $default and $which ne 'TMPL_VAR'
2177 2 30 0 $$options{'die_on_bad_params'} and ref $var ne 'HTML::Template::VAR'
2183 311 13 7 $$options{'global_vars'} and not exists $HTML::Template::top_pmap{$name}
2221 0 14 0 $$options{'die_on_bad_params'} and ref $loop ne 'HTML::Template::LOOP'
2279 3 0 1 $$options{'global_vars'} and not exists $HTML::Template::top_pmap{$var}
2457 69 2 2 not defined $filepath and $$options{'die_on_missing_include'}
2486 63 0 6 $$options{'cache'} and not $$options{'blind_cache'}
2495 0 68 1 $$options{'max_includes'} and scalar @fstack > $$options{'max_includes'}
2567 12 0 0 $$options{'global_vars'} and not exists $HTML::Template::top_pmap{$var}
2730 64 56 1 $$options{'die_on_bad_params'} and not exists $$param_map{$param}
2736 2 0 118 exists $$param_map{$param} and defined $$param_map{$param}
2764 430 570 0 $$options{'die_on_bad_params'} and not exists $$param_map{$param}
2787 878 80 0 $type and $type eq 'ARRAY' || !($type =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value->isa('ARRAY')
2924 623 0 1 defined $args{'print_to'} and not eval { do { tied *{$args{'print_to'};} } }
2932 790 293 15 $type eq 'HTML::Template::VAR' and ref $$HTML::Template::line eq 'CODE'
2937 14 0 1 $$options{'force_untaint'} and tainted $tmp_val
2946 286 0 1 $$options{'force_untaint'} and tainted $$HTML::Template::line
2976 0 0 0 defined $loop_values and ref $loop_values eq 'CODE'
2983 0 0 0 defined $loop_values and @$loop_values
3047 2 0 0 $$options{'force_untaint'} > 1 and tainted $_
3054 32 0 0 $$options{'force_untaint'} > 1 and tainted $_
3076 2 0 0 $$options{'force_untaint'} > 1 and tainted $_
3082 25 0 0 $$options{'force_untaint'} > 1 and tainted $_
3101 2 0 0 $$options{'force_untaint'} > 1 and tainted $_
3107 26 0 0 $$options{'force_untaint'} > 1 and tainted $_
3245 0 2 10 defined $obj and $type eq 'HTML::Template::LOOP'
3320 0 0 6 ref $value_sets_array and ref $value_sets_array eq 'ARRAY'

or 2 conditions

line l !l condition
1508 8 37 $$options{'search_path_on_include'} || 0
1509 0 45 $$options{'loop_context_vars'} || 0
1510 2 43 $$options{'global_vars'} || 0
1511 6 39 $$options{'open_mode'} || 0
1975 97 182 $$options{'filepath'} || '/fake/path/for/non/file/template'
2309 13 73 $$options{'global_vars'} || $$options{'parent_global_vars'} || 0
2786 81 878 ref $value || ''

or 3 conditions

line l !l&&r !l&&!r condition
1147 2 2 5 $$options{'type'} eq 'filename' or $$options{'type'} eq 'scalarref'
4 2 3 $$options{'type'} eq 'filename' or $$options{'type'} eq 'scalarref' or $$options{'type'} eq 'arrayref'
4 2 1 $$options{'type'} eq 'filename' or $$options{'type'} eq 'scalarref' or $$options{'type'} eq 'arrayref' or $$options{'type'} eq 'filehandle'
1410 6 0 264 $$options{'cache'} and not $$options{'shared_cache'} and not $$options{'file_cache'} or $$options{'double_cache'}
6 1 263 $$options{'cache'} and not $$options{'shared_cache'} and not $$options{'file_cache'} or $$options{'double_cache'} or $$options{'double_file_cache'}
1887 3 8 0 $format eq 'array' or $format eq 'scalar'
2153 0 74 676 not defined $name or $which eq 'TMPL_INCLUDE'
74 6 670 not defined $name or $which eq 'TMPL_INCLUDE' or $$options{'case_sensitive'}
2169 46 9 157 $which eq 'TMPL_IF' or $which eq 'TMPL_UNLESS'
45 9 103 $which eq '/TMPL_IF' or $which eq '/TMPL_UNLESS'
2642 0 0 4 $opt eq 'associate' or $opt eq 'filter'
0 1 3 $opt eq 'associate' or $opt eq 'filter' or $opt eq 'path'
2726 286 0 280 scalar @_ or length $type
2745 156 1 2 $type eq 'HASH' or UNIVERSAL::isa($first, 'HASH')
2787 50 0 30 $type eq 'ARRAY' || !($type =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value->isa('ARRAY')
3029 30 1 12 ref $HTML::Template::line eq 'HTML::Template::ESCAPE' or ref $HTML::Template::line eq 'HTML::Template::JSESCAPE'
31 8 4 ref $HTML::Template::line eq 'HTML::Template::ESCAPE' or ref $HTML::Template::line eq 'HTML::Template::JSESCAPE' or ref $HTML::Template::line eq 'HTML::Template::URLESCAPE'
3220 14 8 0 $opt eq 'name' or $opt eq 'loop'