Branch Coverage

blib/lib/Basset/Template.pm
Criterion Covered Total %
branch 2 152 1.3


line true false branch
369 0 0 if (defined $tpl and defined $root and $tpl =~ m[^/] and not $tpl =~ /^$root/) { }
502 0 0 if (ref $template) { }
521 0 0 if (@_)
526 0 0 if (ref $template) { }
571 0 0 if (defined $pipes)
574 0 0 if (my $method = $self->pipe_flags->{$1})
576 0 0 if (defined $2)
581 0 0 $param =~ /^\W/ ? :
605 0 0 unless $self->allows_debugging
620 0 0 unless my $template = shift() || $self->template
633 0 0 if defined $_
650 0 0 unless my $file = shift()
652 0 0 if defined $self->_full_file_path_cache->{$file}
655 0 0 if ($file =~ m[^/]) { }
0 0 elsif ($file =~ /^~/) { }
0 0 elsif ($file =~ /^\.[^.]/) { }
0 0 elsif ($file =~ /[a-zA-Z0-9_]/) { }
659 0 0 unless my $home = $ENV{'HOME'}
660 0 0 unless $home =~ m[/$]
665 0 0 unless my $cwd = Cwd::getcwd()
666 0 0 unless $cwd =~ m[/$]
673 0 0 unless my $cwd = Cwd::getcwd()
674 0 0 unless $cwd =~ m[/$]
683 0 0 if ($file =~ /\.\./)
687 0 0 if ($_ eq '..') { }
707 0 0 unless my $file = shift()
709 0 0 unless my $dir = $self->cache_dir
726 0 0 unless my $file = shift()
736 0 0 if ($file =~ s/\s+>>\s*(\$\w+)//)
744 0 0 if ($file =~ /\s/)
751 0 0 if ($cached) { }
0 0 elsif ($args) { }
764 0 0 unless open $filehandle, '<', $file
766 0 0 unless close $filehandle
806 0 0 unless my $template = shift() || $self->template
810 0 0 unless $self->file
811 0 0 unless $self->package
816 0 0 if ($self->file)
826 0 0 if ($self->preprocessed_template and $self->_current_template eq $template)
838 0 0 if (ref $template) { }
849 0 0 if ($cache_file)
854 0 0 if (-e $cache_file and -M $filename >= -M $cache_file)
862 0 0 unless open $filehandle, '<', $filename
865 0 0 unless close $filehandle
869 0 0 if $using_cache
901 0 0 if (defined $template)
914 0 0 unless my(@tokens) = $self->tokenize($template)
922 0 0 if ($_ =~ /$ein(.*?)$eout/s) { }
0 0 elsif ($_ =~ /$bein(.*?)$beout/s) { }
925 0 0 if $_ =~ /{\s*$/
926 0 0 if $_ =~ /^\s*}/
931 0 0 if $_ =~ /{\s*$/
932 0 0 if $_ =~ /^\s*}/
936 0 0 if ($block and /^\s+$/)
940 0 0 unless (/$file/)
941 0 0 if $self->compress_whitespace
942 0 0 if $self->compress_whitespace
953 0 0 if ($self->caching and $cache_file)
955 0 0 if (my $cache_dir = $self->cache_dir)
959 0 0 unless (-d $cache_dir)
960 0 0 unless mkdir $cache_dir, 511
970 0 0 if $dir =~ /^\s*$/
973 0 0 unless (-d $cache_dir)
974 0 0 unless mkdir $cache_dir, 511
978 0 0 if (open $cachehandle, '>', $cache_file) { }
980 0 0 unless close $cachehandle
1053 0 0 ref $_[0] ? :
1062 0 0 if (not defined $template or ref $template eq 'HASH')
1064 0 0 unless $template = $self->template
1071 0 0 ref $template ? :
1073 0 0 unless $template = $self->preprocess($template)
1097 0 0 unless (ref $$vars{$key} and ref($$vars{$key}) =~ /^(REF|HASH|ARRAY|CODE|GLOB|SCALAR)$/)
1180 25 2 if (defined $string)
1213 0 0 if (defined $value and ref $value eq 'ARRAY') { }
0 0 elsif (defined $value) { }
1216 0 0 unless defined $v