Branch Coverage

lib/Template/Plugin/TwoStage.pm
Criterion Covered Total %
branch 42 58 72.4


line true false branch
40 0 4 if ($@) { }
104 0 5 if $@
152 0 0 ref $_[0] ? :
168 3 37 defined $params ? :
183 1 4 if ($class eq 'Template::Plugin::TwoStage' and my $c = $context->{'CONFIG'}{'TwoStage'}) { }
2 2 elsif ($class ne 'Template::Plugin::TwoStage') { }
189 0 1 if (defined $xk and ref $xk eq 'CODE')
198 0 2 if (defined &{$meth_name;})
216 105 40 ref $proto ? :
220 105 40 defined $name ? :
228 32 4 if ($_ ne 'extend_keys')
229 23 9 defined $self->{'CONFIG'}{$_} ? :
243 0 57 unless exists $params->{'template'}
260 0 57 if ($stash->get('TwoStage_precompile_mode'))
286 24 2 if (scalar @stat and $stash->get('template.modtime') <= $stat[9] and not $self->{'CONFIG'}{'dev_mode'} and !$self->{'CONFIG'}{'ttl'} || time <= $stat[9] + $self->{'CONFIG'}{'ttl'})
304 4 20 $dirs ? :
311 0 24 if $@
333 10 1 if (do { my $class_ue = uri_escape($class, '^A-Za-z0-9_'); $caching_dir =~ /$class_ue/ } and $caching_dir =~ /$CACHE_DIR_NAME/ and -e $caching_dir and -d $caching_dir)
340 0 10 if ($@)
360 4 53 ref $callers ? :
387 0 33 if ($@)
389 0 0 ref $@ ? :
395 0 33 if ($@)
399 0 33 unless open my $fh, '> ', $self->_file_path
415 1 32 if (&Encode::is_utf8($template)) { }
471 8 49 $self->{'CONFIG'}{'namespace'} ? :
2 0 ref $self->{'CONFIG'}{'dir_keys'} ? :
2 55 $self->{'CONFIG'}{'dev_mode'} && $self->{'CONFIG'}{'dir_keys'} ? :
516 13 152 ref $append_dirs ? :