Branch Coverage

lib/Template/Provider.pm
Criterion Covered Total %
branch 155 246 63.0


line true false branch
88 0 85 if ($] < 5.006)
127 1198 230 if (ref $name) { }
31 199 elsif ('File::Spec'->file_name_is_absolute($name)) { }
7 192 elsif ($name =~ /$RELATIVE_PATH/o) { }
130 1198 0 unless $error
133 1197 1 unless $error
140 2 2 $$self{'TOLERANT'} ? :
27 4 $$self{'ABSOLUTE'} ? :
149 2 2 $$self{'TOLERANT'} ? :
3 4 $$self{'RELATIVE'} ? :
156 192 0 $$self{'INCLUDE_PATH'} ? :
196 3 14 if ('File::Spec'->file_name_is_absolute($name)) { }
2 12 elsif ($name =~ /$RELATIVE_PATH/o) { }
199 2 1 unless $$self{'ABSOLUTE'}
204 1 1 unless $$self{'RELATIVE'}
215 10 3 if $self->_template_modified($path)
222 12 5 if defined $path and not $error
225 3 14 if ($error) { }
2 12 elsif (not defined $path) { }
227 1 2 $$self{'TOLERANT'} ? :
250 0 0 if $path
276 46 359 if (ref $dir eq 'CODE') { }
5 354 elsif (ref $dir and UNIVERSAL::can($dir, 'paths')) { }
278 0 46 if ($@)
295 1 206 if @ipaths
349 150 0 unless (defined $dlim)
350 0 150 $^O eq 'MSWin32' ? :
354 142 8 unless ref $path eq 'ARRAY'
359 0 0 if defined $size and $size == 1 || $size < 0
362 17 133 if (defined($debug = $$params{'DEBUG'})) { }
370 0 150 if ($$self{'DEBUG'})
372 0 0 defined $size ? :
379 4 146 if ($cdir)
382 0 4 if ref $dir
384 0 4 if $^O eq 'MSWin32'
388 1 3 unless -d $wdir
413 0 150 defined $$params{'UNICODE'} ? :
434 0 323 if $$self{'DEBUG'}
437 78 245 if (my $slot = $$self{'LOOKUP'}{$name})
441 1 77 $error ? :
447 56 189 if (my $last_stat_time = $$self{'NOTFOUND'}{$name})
449 54 2 if ($expires_in > 0) { }
451 0 54 if $$self{'DEBUG'}
460 17 174 if ($self->_compiled_is_current($name))
465 17 0 if $compiled_template
475 87 87 if ($error)
484 1 86 if ($error) { }
507 0 195 if $$self{'DEBUG'}
511 0 195 if (my $slot = $$self{'LOOKUP'}{$name})
515 0 0 $error ? :
527 0 293 if $$self{'DEBUG'}
532 153 140 if not $error or $error == 255
538 3 38 if defined $$self{'DEFAULT'} and $name ne $$self{'DEFAULT'}
551 233 62 unless $compext or $compdir
554 0 62 unless $path =~ /^(.+)$/s
555 0 62 if $^O eq 'MSWin32'
558 38 24 if length $compdir
572 0 17 $@ ? :
598 10 1364 unless defined $alias or ref $name
601 0 0 defined $alias ? :
0 1374 if $$self{'DEBUG'}
604 1197 177 if (ref $name eq 'SCALAR')
607 0 1197 defined $alias ? :
0 1197 defined $alias ? :
616 1 176 if (ref $name)
619 1 0 if $$self{'UNICODE'}
621 0 1 defined $alias ? :
0 1 defined $alias ? :
630 89 87 if ($self->_template_modified($name))
632 89 0 unless ($error)
633 89 0 if $$self{'UNICODE'}
643 0 0 unless $tolerant
667 0 0 defined $_ ? :
669 0 78 if $$self{'DEBUG'}
677 2 76 if ($expires_in_sec <= 0) { }
0 76 elsif ($$self{'DEBUG'}) { }
685 2 0 if (not defined $template_mtime or $template_mtime != $$slot[3])
687 0 2 if $$self{'DEBUG'}
690 2 0 unless $error
693 1 1 if ($error) { }
712 47 31 unless ($$self{'HEAD'} == $slot)
714 47 0 if ($$slot[0]) { }
720 18 29 if ($$slot[4]) { }
729 47 0 if $head
760 0 103 if defined $size and not $size
764 0 103 if $$self{'DEBUG'}
769 0 103 if (defined $size and $$self{'SLOTS'} >= $size) { }
771 0 0 if $$self{'DEBUG'}
783 0 0 if $head
793 0 103 if $$self{'DEBUG'}
798 59 44 if $head
800 44 59 unless $$self{'TAIL'}
834 0 0 defined $compfile ? :
0 1287 if $$self{'DEBUG'}
844 1284 3 if ($parsedoc = $parser->parse($text, $data)) { }
853 14 1270 if ($compfile)
858 6 8 unless (-d $basedir)
860 0 6 if $@
864 14 0 unless ($error)
866 0 14 unless $docclass->write_perl_file($compfile, $parsedoc)
874 14 0 if (not defined $error and defined $$data{'time'})
875 0 14 unless (my($cfile) = $compfile =~ /^(.+)$/s)
881 0 14 unless ($ctime or $ctime eq 0)
888 0 14 if $$self{'DEBUG'}
892 1284 0 unless ($error)
894 1284 0 if $$data{'data'} = $DOCUMENT->new($parsedoc)
905 0 3 $$self{'TOLERANT'} ? :
956 0 101 unless $path
964 0 101 if (-d $path) { }
101 0 elsif (open FH, "< $path") { }
979 101 0 wantarray ? :
998 0 103 $time ? :
1014 0 0 $parser ? :
1016 0 0 unless defined $size
1035 0 0 defined $_ ? :
1038 0 0 defined $$lookup{$_} ? :
1060 0 0 if ($node = $$self{'HEAD'})
1072 0 0 $prev ? :
1073 0 0 $next ? :
1090 0 90 unless defined $string
1095 0 90 if Encode::is_utf8($string)
1107 5 435 if ($bom eq substr($string, 0, length $bom))
1114 0 85 $$self{'ENCODING'} ? :