Branch Coverage

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


line true false branch
57 2475 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 2212 if ($file =~ /\Q$updir\E/mosx)
298 97 2130 if (ref $p eq 'HASH') { }
299 5 92 unless defined(my $content = $p->{$file})
311 15 2115 unless defined($orig_mtime = (stat $fullpath)[9])
314 0 2115 if (length $cache_prefix > 127)
331 5 2207 unless (defined $orig_mtime)
339 92 2115 ref $fullpath ? :
356 1 2099 if ($file eq '')
368 2081 7 if ($self->{'cache'} < 2)
379 70 1980 if (ref $fullpath eq 'SCALAR') { }
382 0 1980 unless open my $source, '<' . $input_layer, $fullpath
398 29 1995 if (-e $cachepath)
399 0 29 unless unlink $cachepath
404 1 2023 if $self->{'pre_process_handler'}
412 88 1931 if ($self->{'cache'} >= 1)
415 34 54 unless (-e $cachedir)
418 0 34 unless (-e $cachedir)
425 88 0 if (open my $out, '>:raw', $tmpfile) { }
428 0 88 if (not close $out) { }
88 0 elsif (rename $tmpfile, $cachepath) { }
434 62 26 if (not ref $fullpath) { }
436 52 10 if (defined $main_mtime and $main_mtime > $mtime)
467 7 2086 if ($self->{'cache'} >= 2) { }
476 14 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 58 11 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 62 26 $is_utf8 ? :
558 11 1392 if ($c->[0] eq 'depend')
560 11 0 if ($newest_mtime < $dep_mtime)
579 40 132 if (ref $fullpath)
599 137 2589 if (exists $self->{$name})
623 237 3205 unless (ref $compiler)