Branch Coverage

blib/lib/YATT/Lite/WebMVC0/SiteApp.pm
Criterion Covered Total %
branch 59 120 49.1


line true false branch
77 16 0 ref $this ? :
78 0 16 unless my $sub = $self->can("runas_$type")
96 0 0 ref $this ? :
97 0 0 unless my $sub = $self->can("callas_$type")
121 0 201 if ($self->{'cf_per_role_docroot'}) { }
135 1 0 unless @dir
149 3 9 if -d $_
170 0 8 unless (defined $self->{'cf_doc_root'} or defined $self->{'cf_per_role_docroot'})
183 1 7 if ($backend = $self->{'cf_backend'} and my $sub = $backend->can('startup'))
194 0 170 if ($self->has_htdebug('env'))
199 3 167 if (my $deny = $self->has_forbidden_path($env->{'PATH_INFO'}) // $self->has_forbidden_path($env->{'PATH_TRANSLATED'}))
204 167 0 if (not $self->{'cf_no_unicode_params'} and $self->{'cf_output_encoding'})
210 3 164 if ($self->{'loc2psgi_dict'} and my $psgi_app = $self->lookup_psgi_mount($env->{'PATH_INFO'}))
224 163 1 if (@pi)
227 163 0 defined $self->{'cf_doc_root'} ? :
230 0 164 if ($self->has_htdebug('path_info'))
239 0 164 if ($self->{'cf_debug_psgi'})
241 0 0 fileno STDERR ? :
0 0 if (my $errfh = fileno STDERR ? \*STDERR : $env->{'psgi.errors'})
254 1 163 unless (@pi)
258 0 163 unless (-d $realdir)
264 0 163 if ($file eq '') { }
0 163 elsif ($file eq $self->{'cf_index_name'}) { }
270 1 162 unless ($file =~ /$self->{'re_handled_ext'}/)
271 0 1 if ($self->{'cf_debug_psgi'} and $self->has_htdebug('static'))
278 0 162 unless (my $dh = $self->get_lochandler(map({untaint_any($_);} $loc, $tmpldir)))
287 91 71 $is_index ? :
299 142 20 if (not $error or is_done($error)) { }
19 1 elsif (ref $error eq 'ARRAY' or ref $error eq 'CODE') { }
303 142 0 $self->{'cf_header_charset'} ? :
305 0 142 if (my(@h) = $con->list_header)
312 0 19 if ($self->{'cf_debug_psgi'})
313 0 0 fileno STDERR ? :
0 0 if (my $errfh = fileno STDERR ? \*STDERR : $env->{'psgi.errors'})
327 0 37 ref $reqrec ? :
339 0 0 if (@rest == 2 and defined $rest[-1] and ref $args eq 'HASH')
365 0 1 unless my $app = ($self->{'cf_psgi_fallback'} ||= $self->psgi_file_app($self->{'cf_doc_root'}))
374 0 2 if (my $pfx = $self->{'cf_site_prefix'}) { }
389 0 22 if defined $_[0] and ref $_[0] eq 'SCALAR' and not ref ${$_[0];}
398 8 156 if (not $self->{'cf_no_trim_script_name'} and $env->{'REDIRECT_HANDLER'} and ($env->{'REDIRECT_STATUS'} // 0) == 200 and $env->{'SCRIPT_FILENAME'}) { }
420 16 164 if (not $self->{'cf_per_role_docroot'} and nonempty($env->{'PATH_TRANSLATED'}) and $self->is_path_translated_mode($env)) { }
164 0 elsif (nonempty($env->{'PATH_INFO'})) { }
459 0 164 if ($self->{'cf_per_role_docroot'}) { }
504 1 1 if ($path_info =~ s[^(/~[^/]+)(?=/)][]) { }
522 0 2 if (wantarray) { }
534 0 0 if (my($user) = $path_info =~ m[^/~([^/]+)/]) { }
544 0 0 unless $self->{'allow_debug_from'}
545 0 0 unless defined(my $ip = $self->guess_client_ip($env))
552 0 0 if (defined(my $forward = $env->{'HTTP_X_FORWARDED_FOR'})) { }
569 334 0 if defined $self->{'cf_app_root'}
590 0 230 if ($self->{'cf_noheader'}) { }
601 0 230 if (my $fn = $self->{'cf_logfile'})
604 0 0 unless open my $fh, '>>', $real
609 0 230 if $self->{'cf_debug_connection'}
611 0 230 if (my $back = $self->{'cf_backend'})
615 230 0 if (my $enc = $self->{'cf_output_encoding'})
629 0 230 if $prop->{'session'}
640 0 0 unless $self->{'cf_header_charset'}
648 0 0 unless defined $name
664 0 2 unless (defined $remote_addr and $remote_addr ne '')