Branch Coverage

blib/lib/CGI/Template.pm
Criterion Covered Total %
branch 15 74 20.2


line true false branch
62 1 0 unless $template_dir
66 0 1 if ($request_method)
67 0 0 if ($request_method =~ /^get$/iu) { }
0 0 elsif ($request_method =~ /^post$/iu) { }
68 0 0 unless ($crm =~ /^get$/iu)
73 0 0 unless ($crm =~ /^post$/iu)
83 1 0 unless $doctype
85 0 1 if ($doctype =~ /^transitional$/iu or $doctype =~ /^loose$/iu) { }
0 1 elsif ($doctype =~ /^frameset$/iu) { }
0 1 elsif ($doctype =~ /^strict$/iu) { }
0 1 elsif ($doctype =~ /^html5$/iu) { }
0 1 elsif ($doctype =~ /^none$/iu) { }
1 0 elsif ($doctype =~ /^$/iu) { }
108 0 1 if ($path)
118 0 1 if $template
136 0 0 if ($i =~ /-cookie/u) { }
0 0 elsif ($i =~ /-content-type/u) { }
0 0 elsif ($i =~ /-redirect/u) { }
152 1 0 unless $redirect
167 0 0 unless defined $$self{'template'}
191 0 0 if (-e "$template_dir/error.html")
193 0 0 unless open INFILE, "$template_dir/error.html"
194 0 0 if ($fail)
202 0 0 unless $error_template
237 0 0 if (-e $i)
243 0 0 unless ($tn)
245 0 0 unless $tn
249 0 0 unless open INFILE, $tn
250 0 0 if ($fail)
298 0 1 if (-e "$template_dir/head.html")
300 0 0 unless open INFILE, "$template_dir/head.html"
301 0 0 if ($fail)
311 0 3 if (-e $i)
317 1 0 unless $tn
320 0 0 unless open INFILE, $tn
322 0 0 if ($fail)
333 0 0 if ($head_template) { }