Branch Coverage

blib/lib/Text/Xslate.pm
Criterion Covered Total %
branch 87 102 85.2


line true false branch
57 2474 291 ref $_[0] ? :
166 12 280 @_ == 1 ? :
172 718 5418 if (exists $args{$key}) { }
1565 3853 elsif (defined $options->{$key}) { }
180 2 290 if ($used != $nargs)
187 55 249 ref $_ ? :
189 248 43 ref $args{'path'} eq 'ARRAY' ? :
210 11 279 if (defined $args{'module'})
216 1 287 if (defined $args{'html_builder_module'})
247 0 863 unless my $v = $funcs->{$f}
252 863 0 if (ref $v or &Scalar::Util::looks_like_number($v)) { }
257 0 0 if $seen{$v}++
270 1 1348 unless (defined $string)
286 4 2211 if ($file =~ /\Q$updir\E/mosx)
298 97 2129 if (ref $p eq 'HASH') { }
299 5 92 unless defined(my $content = $p->{$file})
311 15 2114 unless defined($orig_mtime = (stat $fullpath)[9])
314 0 2114 if (length $cache_prefix > 127)
331 5 2206 unless (defined $orig_mtime)
339 92 2114 ref $fullpath ? :
356 1 2098 if ($file eq '')
368 2080 7 if ($self->{'cache'} < 2)
379 70 1979 if (ref $fullpath eq 'SCALAR') { }
382 0 1979 unless open my $source, '<' . $input_layer, $fullpath
398 28 1995 if (-e $cachepath)
399 0 28 unless unlink $cachepath
404 1 2022 if $self->{'pre_process_handler'}
412 87 1931 if ($self->{'cache'} >= 1)
415 34 53 unless (-e $cachedir)
418 0 34 unless (-e $cachedir)
425 87 0 if (open my $out, '>:raw', $tmpfile) { }
428 0 87 if (not close $out) { }
87 0 elsif (rename $tmpfile, $cachepath) { }
434 61 26 if (not ref $fullpath) { }
436 50 11 if (defined $main_mtime and $main_mtime > $mtime)
467 7 2085 if ($self->{'cache'} >= 2) { }
476 13 84 unless (defined $fi->{'cache_mtime'} and $self->{'cache'} >= 1 and $threshold >= $fi->{'orig_mtime'})
485 0 84 unless open my $in, '<:raw', $cachepath
491 15 69 if ($data ne $magic) { }
507 59 10 if ($is_utf8)
518 2 1253 if ($c->[0] eq 'depend') { }
3 1250 elsif ($c->[0] eq 'literal') { }
520 0 2 unless (defined $dep_mtime)
524 0 2 if ($dep_mtime > $threshold)
534 1 2 if $is_utf8
552 60 27 $is_utf8 ? :
558 11 1386 if ($c->[0] eq 'depend')
560 11 0 if ($newest_mtime < $dep_mtime)
579 40 131 if (ref $fullpath)
599 137 2589 if (exists $self->{$name})
623 237 3204 unless (ref $compiler)