Branch Coverage

blib/lib/Template/Like/Processor.pm
Criterion Covered Total %
branch 128 170 75.2


line true false branch
114 16 293 unless (UNIVERSAL::isa($$self{'OPTION'}{$key}, 'ARRAY'))
125 103 0 unless (UNIVERSAL::isa($$self{'OPTION'}{'STASH'}, 'Template::Like::Stash'))
129 103 0 unless ($self->START_TAG)
133 103 0 unless ($self->END_TAG)
223 10 93 if (not ref $data) { }
92 1 elsif (UNIVERSAL::isa($data, 'SCALAR')) { }
0 1 elsif (UNIVERSAL::isa($data, 'ARRAY')) { }
1 0 elsif (UNIVERSAL::isa($data, 'GLOB')) { }
229 8 2 unless ($self->RELATIVE)
230 1 7 if ($filename =~ m[(?:^|/)\.+/])
235 8 1 unless ($self->ABSOLUTE)
236 1 7 if ('File::Spec'->file_name_is_absolute($filename))
243 1 7 if ('File::Spec'->file_name_is_absolute($filename)) { }
244 1 0 if -f $filename
247 7 3 if (-f 'File::Spec'->catfile($dir, $filename))
254 0 8 unless $filepath
258 0 8 if exists $$self{'OPEND'}{$filepath} and $$self{'OPEND'}{$filepath} > 10
263 0 8 unless my $fh = 'IO::File'->new($filepath)
320 59 242 if (exists $$codeSet{$directive_post})
335 0 181 unless defined $text
336 0 181 unless defined $ele
342 0 181 if ($pre_chomp == 1) { }
0 181 elsif ($pre_chomp == 2) { }
0 181 elsif ($pre_chomp == 3) { }
350 13 168 if ($post_chomp == 1) { }
0 168 elsif ($post_chomp == 2) { }
0 168 elsif ($post_chomp == 3) { }
358 69 112 if length $text
370 39 154 if ($directive eq 'END') { }
13 141 elsif ($directive eq 'ELSE') { }
7 134 elsif ($directive eq 'ELSIF') { }
390 19 82 if length $$text_ref
410 3 8 if ($key =~ /(.*)=(.*)/)
421 11 0 unless ($@)
427 0 0 if $@
441 48 145 if ($expression =~ s/^(CALL|GET|SET|IF|UNLESS|ELSIF|DUMMY|PRE_SPACE|POST_SPACE)\s+//x) { }
11 134 elsif ($expression =~ s/^USE\s+//) { }
1 133 elsif ($expression =~ /^(FILTER|INSERT|INCLUDE)\s+(\S.*)$/sx) { }
13 120 elsif ($expression =~ s/ELSE//) { }
39 81 elsif ($expression =~ s/END//) { }
1 80 elsif ($expression =~ s/^FOREACH\s*(\w+)\s*(?:\=|IN)\s*//) { }
2 78 elsif ($expression =~ s/^WHILE\s*//) { }
455 3 8 if ($expression =~ s/^(\w+)\s*=\s*//)
460 11 0 if ($expression =~ s/^([a-zA-Z0-9\.]+)//)
472 0 1 if ($expression =~ s/^\$//) { }
476 1 0 if ($expression =~ s/([^\(\);\s]+)//)
572 21 327 if (defined($token = $3)) { }
8 319 elsif (defined($token = $4)) { }
0 319 elsif (defined($token = $5)) { }
7 312 elsif (defined($token = $6)) { }
12 300 elsif (defined($token = $7)) { }
13 287 elsif (defined($token = $8)) { }
2 285 elsif (defined($token = $9) and $directive eq 'USE') { }
4 281 elsif (defined($token = $9)) { }
168 113 elsif (defined($token = $10)) { }
113 0 elsif (defined($token = $11)) { }
596 13 0 if ($token =~ /^\./ and $code =~ /\)$/) { }
0 0 elsif ($token =~ /^\$(.*)$/) { }
0 0 elsif ($token =~ /^\.(.*)$/) { }
629 1 3 if ($directive eq 'GET')
634 1 3 if ($token =~ /^\./ and $code =~ /\)$/) { }
0 3 elsif ($token =~ /^\$(.*)$/) { }
0 3 elsif ($token =~ /^\.(.*)$/) { }
659 27 141 if ($token =~ /^\./ and $code =~ /\)$/) { }
0 141 elsif ($token =~ /^\$(.*)$/) { }
0 141 elsif ($token =~ /^\.(.*)$/) { }
684 6 107 if ($token eq '==') { }
2 105 elsif ($token eq '!=') { }
0 105 elsif ($token eq '_') { }
23 82 elsif ($token eq ')') { }
12 70 elsif ($token eq ';') { }
730 4 18 if (exists $self->FILTERS->{$name})
735 18 0 if (UNIVERSAL::can($filter, $name))
767 0 101 if $self->DEBUG
771 0 101 if $@
797 98 3 if (ref $output) { }
799 95 3 if (UNIVERSAL::isa($output, 'SCALAR')) { }
1 2 elsif (UNIVERSAL::isa($output, 'ARRAY')) { }
1 1 elsif (UNIVERSAL::isa($output, 'CODE')) { }
0 1 elsif (UNIVERSAL::isa($output, 'GLOB')) { }
1 0 elsif (UNIVERSAL::can($output, 'print')) { }
829 2 1 $self->OUTPUT_PATH ? :
833 0 3 -f $path ? :
834 0 3 unless my $fh = 'IO::File'->new($mark . $path)
845 1 0 if @_ == 1 and UNIVERSAL::isa($_[0], 'ARRAY')