Branch Coverage

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


line true false branch
57 2474 294 ref $_[0] ? :
166 12 283 @_ == 1 ? :
172 720 5479 if (exists $args{$key}) { }
1585 3894 elsif (defined $options->{$key}) { }
180 2 293 if ($used != $nargs)
187 56 251 ref $_ ? :
189 250 44 ref $args{'path'} eq 'ARRAY' ? :
210 11 282 if (defined $args{'module'})
216 1 290 if (defined $args{'html_builder_module'})
247 0 872 unless my $v = $funcs->{$f}
252 872 0 if (ref $v or &Scalar::Util::looks_like_number($v)) { }
257 0 0 if $seen{$v}++
270 1 1370 unless (defined $string)
286 4 2214 if ($file =~ /\Q$updir\E/mosx)
298 100 2129 if (ref $p eq 'HASH') { }
299 5 95 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 2209 unless (defined $orig_mtime)
339 95 2114 ref $fullpath ? :
356 1 2100 if ($file eq '')
368 2082 7 if ($self->{'cache'} < 2)
379 72 1976 if (ref $fullpath eq 'SCALAR') { }
382 0 1976 unless open my $source, '<' . $input_layer, $fullpath
398 25 1997 if (-e $cachepath)
399 0 25 unless unlink $cachepath
404 1 2021 if $self->{'pre_process_handler'}
412 86 1931 if ($self->{'cache'} >= 1)
415 34 52 unless (-e $cachedir)
418 0 34 unless (-e $cachedir)
425 86 0 if (open my $out, '>:raw', $tmpfile) { }
428 0 86 if (not close $out) { }
86 0 elsif (rename $tmpfile, $cachepath) { }
434 58 28 if (not ref $fullpath) { }
436 48 10 if (defined $main_mtime and $main_mtime > $mtime)
467 7 2087 if ($self->{'cache'} >= 2) { }
476 9 88 unless (defined $fi->{'cache_mtime'} and $self->{'cache'} >= 1 and $threshold >= $fi->{'orig_mtime'})
485 0 88 unless open my $in, '<:raw', $cachepath
491 16 72 if ($data ne $magic) { }
507 61 11 if ($is_utf8)
518 2 1271 if ($c->[0] eq 'depend') { }
3 1268 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 58 28 $is_utf8 ? :
558 11 1406 if ($c->[0] eq 'depend')
560 11 0 if ($newest_mtime < $dep_mtime)
579 42 132 if (ref $fullpath)
599 137 2597 if (exists $self->{$name})
623 237 3225 unless (ref $compiler)