line |
true |
false |
branch |
64
|
5 |
8 |
if (defined $args{'template_dir'}) { } |
|
0 |
8 |
elsif (not defined $args{'template_loader'}) { } |
113
|
0 |
9 |
if (defined $container_override_id) { } |
121
|
1 |
8 |
if (defined $container_id) { } |
126
|
0 |
1 |
if (defined $used_containers{$container_id}) |
143
|
0 |
8 |
if ($@) |
170
|
0 |
0 |
if ($err =~ /at ([^\s]+) line\s+(\d+)/) |
181
|
0 |
0 |
if ($line =~ /^###TMOJO_TEMPLATE_ID: (.+)$/) |
186
|
0 |
0 |
if ($cur_line == $line_number) |
187
|
0 |
0 |
if ($line =~ /###TMOJO_LINE: (\d+)$/) |
229
|
54 |
73 |
if ($pos > -1) |
281
|
8 |
37 |
if (scalar @parsed == 0) |
282
|
1 |
7 |
if ($source =~ s/^([ \t]*)$tag_line_r//s) |
289
|
44 |
1 |
unless ($found_tag == 1) |
290
|
38 |
6 |
if ($source =~ s/^(.*?)($tag_open_r|(\n[ \t]*)$tag_line_r)//s) |
294
|
31 |
7 |
if ($2 eq $tag_open) { } |
303
|
7 |
31 |
if ($tag_notation eq 'line') |
309
|
39 |
6 |
if ($found_tag == 1) { } |
|
6 |
0 |
elsif ($source ne '') { } |
311
|
34 |
5 |
if ($pre_tag_text ne '') |
323
|
31 |
8 |
if ($tag_notation eq 'inline') { } |
326
|
31 |
0 |
if ($source =~ s/^(.*?)$tag_close_r//s) { } |
355
|
31 |
8 |
if ($tag_notation eq 'inline') |
356
|
2 |
29 |
if ($tag_inside =~ s/^--//) { } |
|
0 |
29 |
elsif ($tag_inside =~ s/^-//) { } |
|
0 |
29 |
elsif ($tag_inside =~ s/^\+//) { } |
366
|
1 |
30 |
if ($tag_inside =~ s/--$//) { } |
|
1 |
29 |
elsif ($tag_inside =~ s/-$//) { } |
|
0 |
29 |
elsif ($tag_inside =~ s/\+$//) { } |
379
|
0 |
39 |
if ($tag_inside =~ /^\s*$/) { } |
|
18 |
21 |
elsif ($tag_inside =~ s[^\s*(/?(?:$keywords))\s+][]) { } |
|
13 |
8 |
elsif ($tag_notation eq 'inline') { } |
387
|
0 |
13 |
if ($tag_inside =~ /^\s*(if|unless|while|until|for|foreach)\s+/) { } |
|
0 |
13 |
elsif ($tag_inside =~ /^\s*\}?\s*(else|elsif|continue)\s+/) { } |
|
0 |
13 |
elsif ($tag_inside =~ /^\s*\}\s*$/) { } |
415
|
37 |
2 |
unless (defined $tag{'crush_before'}) |
419
|
37 |
2 |
unless (defined $tag{'crush_after'}) |
426
|
4 |
35 |
if ($tag{'type'} eq 'TAG_STYLE') |
427
|
1 |
3 |
if ($tag{'text'} eq 'default') { } |
434
|
0 |
4 |
if ($tag_open eq '') |
438
|
0 |
4 |
if ($tag_close eq '') |
442
|
0 |
4 |
if ($tag_line eq '') |
446
|
0 |
4 |
if ($tag_line eq $tag_open or $tag_line eq $tag_close) |
465
|
11 |
68 |
if ($parsed[$i]{'crush_before'} == 1 and $i > 0 and $parsed[$i - 1]{'type'} eq 'TEXT') { } |
|
6 |
62 |
elsif ($parsed[$i]{'crush_before'} == 2 and $i > 0 and $parsed[$i - 1]{'type'} eq 'TEXT') { } |
472
|
1 |
78 |
if ($parsed[$i]{'crush_after'} == 1 and $i < scalar(@parsed) - 1 and $parsed[$i + 1]{'type'} eq 'TEXT') { } |
|
9 |
70 |
elsif ($parsed[$i]{'crush_after'} == 2 and $i < scalar(@parsed) - 1 and $parsed[$i + 1]{'type'} eq 'TEXT') { } |
488
|
8 |
0 |
if (ref $source eq 'ARRAY') |
531
|
38 |
37 |
if ($$tag{'type'} eq 'TEXT') { } |
|
1 |
36 |
elsif ($$tag{'type'} eq 'GLOBAL') { } |
|
0 |
36 |
elsif ($$tag{'type'} eq 'INIT') { } |
|
11 |
25 |
elsif ($$tag{'type'} eq 'PERL') { } |
|
4 |
21 |
elsif ($$tag{'type'} eq 'METHOD') { } |
|
4 |
17 |
elsif ($$tag{'type'} eq '/METHOD') { } |
|
13 |
4 |
elsif ($$tag{'type'} eq 'MERGE') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq 'CAPTURE') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq '/CAPTURE') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq 'FILTER') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq '/FILTER') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq 'REGEX') { } |
|
0 |
4 |
elsif ($$tag{'type'} eq '/REGEX') { } |
546
|
0 |
1 |
if ($cur_method ne 'main') |
550
|
0 |
1 |
if ($global_section ne '') |
558
|
0 |
2 |
unless (defined $tag) |
562
|
1 |
1 |
if ($$tag{'type'} eq '/GLOBAL') { } |
|
0 |
1 |
elsif ($$tag{'type'} ne 'TEXT') { } |
569
|
1 |
0 |
unless (defined $start_line) |
584
|
0 |
0 |
if ($cur_method ne 'main') |
588
|
0 |
0 |
if ($init_section ne '') |
596
|
0 |
0 |
unless (defined $tag) |
600
|
0 |
0 |
if ($$tag{'type'} eq '/INIT') { } |
|
0 |
0 |
elsif ($$tag{'type'} ne 'TEXT') { } |
607
|
0 |
0 |
unless (defined $start_line) |
622
|
10 |
1 |
if ($$tag{'text'} ne '') { } |
636
|
0 |
2 |
unless (defined $tag) |
640
|
1 |
1 |
if ($$tag{'type'} eq '/PERL') { } |
|
0 |
1 |
elsif ($$tag{'type'} ne 'TEXT') { } |
647
|
1 |
0 |
unless (defined $start_line) |
663
|
0 |
4 |
if ($cur_method ne 'main') |
668
|
0 |
4 |
unless ($cur_method =~ /^[a-zA-Z]\w*$/) |
672
|
0 |
4 |
if (defined $methods{$cur_method}) |
682
|
0 |
4 |
if ($cur_method eq 'main') |
702
|
0 |
13 |
if (@lines) { } |
730
|
0 |
0 |
if (pop @stack ne 'CAPTURE') |
757
|
0 |
0 |
if (pop @stack ne 'FILTER') |
784
|
0 |
0 |
if (pop @stack ne 'REGEX') |
796
|
0 |
8 |
if ($cur_method ne 'main') |
800
|
0 |
8 |
if (@stack) |
875
|
0 |
0 |
if (ref $source eq 'ARRAY') |
894
|
0 |
0 |
if ($$tag{'type'} eq 'TEXT') { } |
|
0 |
0 |
elsif ($$tag{'type'} eq 'METHOD') { } |
|
0 |
0 |
elsif ($$tag{'type'} eq '/METHOD') { } |
|
0 |
0 |
elsif ($$tag{'type'} eq 'MERGE') { } |
909
|
0 |
0 |
if ($cur_method ne 'main') |
914
|
0 |
0 |
unless ($cur_method =~ /^[a-zA-Z]\w*$/) |
918
|
0 |
0 |
if ($methods{$cur_method} ne '') |
928
|
0 |
0 |
if ($cur_method eq 'main') |
940
|
0 |
0 |
if ($$tag{'text'} =~ /^\$([\w\.]+)$/) { } |
952
|
0 |
0 |
if ($cur_method ne 'main') |
1017
|
1 |
8 |
if (-r $template_compiled_fn) |
1026
|
1 |
8 |
if ($template_lines == 0) |
1029
|
1 |
0 |
if (exists $memory_cache{$package_name}) |
1030
|
1 |
0 |
if ($cache_time_stamp <= $memory_cache{$package_name}) |
1037
|
8 |
1 |
if ($cache_level == 0) |
1041
|
0 |
8 |
if ($tmojo_lite) { } |
1059
|
0 |
8 |
unless open CODE_FH, ">$template_compiled_fn" |
1060
|
0 |
8 |
unless open LINE_FH, ">$template_compiled_fn.lines" |
1063
|
36 |
514 |
if ($line =~ /^(.*)(###TMOJO_(TEMPLATE_ID|LINE): .+)$/) { } |
1078
|
8 |
1 |
if ($cache_level < 2) |
1093
|
0 |
8 |
if $@ |
1107
|
0 |
9 |
if (defined $used_parents) { } |
1108
|
0 |
0 |
if ($$used_parents{$normalized_template_id} == 1) |
1120
|
0 |
9 |
if (@parents) |
1138
|
0 |
18 |
if (substr($template_id, 0, 3) eq '../') { } |
|
16 |
2 |
elsif (substr($template_id, 0, 1) ne '/') { } |
1153
|
0 |
18 |
if (substr($template_id, -1, 1) eq '^') |
1157
|
0 |
0 |
if ($$self{'template_loader'}->template_exists($template_id)) { } |
1183
|
25 |
20 |
unless (-d $current_dir) |