Branch Coverage

web/cgi-bin/yatt.lib/YATT/Toplevel/CGI.pm
Criterion Covered Total %
branch 15 206 7.2


line true false branch
89 0 0 unless my $sub = $pack->can("run_$method")
103 0 0 if (catch sub { ($pack, $root, $cgi, $file, $param) = $pack->prepare_dispatch($cgi, $config); } , \$error) { }
117 0 0 if (UNIVERSAL::isa($root_or_config, 'YATT::Toplevel::CGI::Config')) { }
127 0 0 if ($rc)
130 0 0 if ($i++ > $max)
141 0 0 if ($rc and not is_normal_end($error))
150 1 0 if @_
156 0 1 if $$config{'cf_tmpl'}
172 0 0 if (not $$config{'cf_registry'} and $$config{'cf_docs'}) { }
0 0 elsif ($YATT::Toplevel::CGI::REDIRECT_STATUS) { }
0 0 elsif ($YATT::Toplevel::CGI::PATH_INFO and $YATT::Toplevel::CGI::SCRIPT_FILENAME) { }
195 0 0 unless ($loader)
201 0 0 unless (chdir $rootdir)
205 0 0 unless ($YATT::Toplevel::CGI::PATH_INFO)
206 0 0 if ($YATT::Toplevel::CGI::PATH_TRANSLATED)
208 0 0 if (index($YATT::Toplevel::CGI::PATH_TRANSLATED, $rootdir) == 0)
214 0 0 if (my $sub = $cgi->can('charset'))
238 0 1 if $name =~ /$PARAM_CONVENTION/
260 0 0 if (defined $file and -r $file)
262 0 0 unless $ENV{'REDIRECT_STATUS'} == 200
263 0 0 unless $ENV{'PATH_TRANSLATED'} eq $file
292 0 0 if ($$CONFIG{'cf_use_session'})
298 0 0 if (catch sub { $found = ($renderer, $pkg, $widget) = $root->lookup_handler_to('render', @elpath); } , \my($error)) { }
0 0 elsif (not $found) { }
0 0 elsif (not defined $renderer) { }
311 0 0 unless ($$CONFIG{'cf_no_chdir'})
316 0 0 if (not defined $param[0] and $widget->public)
319 0 0 if (my $handler = $pkg->can('dispatch_action')) { }
340 0 0 if (not $root) { }
0 0 elsif (catch sub { $found = ($renderer, $pkg) = $root->lookup_handler_to('render', 'error'); } , \my($load_error)) { }
0 0 elsif (not $found) { }
0 0 elsif (catch sub { $html = capture(sub { &$renderer($pkg, [$error, $info]); } ); } , \my($error2)) { }
347 0 0 $CGI ? :
349 0 0 if $info
354 0 0 if (not ref $error2) { }
0 0 elsif (not UNIVERSAL::isa($error2, 'YATT::Exception')) { }
0 0 elsif ($error2->is_normal) { }
364 0 0 $CGI ? :
374 0 0 if ($CONFIG and $$CONFIG{'cf_no_header'}) { }
379 0 0 $SESSION ? :
387 0 0 if $cgi
390 0 0 $cgi ? :
422 0 0 unless -d (my $dir = "$rootname.tmpl")
429 0 0 defined $level ? :
434 0 0 unless -r $file
435 0 0 wantarray ? :
445 0 1 if (not defined $file && -r $file) { }
0 1 elsif (-f $file) { }
0 1 elsif (not -d $file) { }
0 1 elsif (-r (my $found = "$file/" . $config->ROOT_CONFIG)) { }
0 1 elsif ($config->find_root_upward and my(@found) = $config->upward_find_file($file, $config->find_root_upward)) { }
446 0 0 defined $file ? :
466 1 0 unless -f $file and -r $file
479 0 0 unless @prefix
486 0 0 unless @dirs
496 0 0 unless ($not_found or -e $path_translated)
503 0 0 unless ($$cfobj{'cf_registry'})
514 0 0 @params ? :
526 0 0 unless ($@)
531 0 0 unless ($class)
535 0 0 if ($class eq 'CGI' and not $class->can('multi_param'))
542 0 0 if (UNIVERSAL::isa($oldcgi, $class)) { }
545 0 0 defined $oldcgi ? :
553 0 0 if (ref $$CONFIG{'cf_use_session'}) { }
573 1 0 @_ == 1 ? :
574 0 1 if defined $config and ref $config and UNIVERSAL::isa($config, 'YATT::Toplevel::CGI::Config')
577 1 0 if (ref $pack or not UNIVERSAL::isa($pack, 'YATT::Toplevel::CGI::Config'))
582 0 1 if (not defined $config) { }
1 0 elsif (not ref $config) { }
0 0 elsif (ref $config eq 'ARRAY') { }
0 0 elsif (ref $config eq 'HASH') { }
609 0 0 if ($mine)
612 0 0 if ($$trans_keys{"cf_$name"}) { }
0 0 elsif (not $mine) { }
618 0 0 if @mine
620 0 0 if ($$trans_keys{"cf_$name"} and defined(my $value = $$config{"cf_$name"}))
626 0 0 if (@unknown)
627 0 0 unless ($$config{'cf_allow_unknown_config'})
639 0 0 unless eval "require $class"
641 0 0 if (my $sub = $class->can('rlimit_' . $rsrc)) { }
654 0 0 if (@value > 1) { }
675 0 0 unless defined $env
678 0 0 unless defined $$env{$vn}
689 0 0 if (defined $random) { }
690 0 0 ref $random ? :
701 0 0 if ($RANDOM_LIST) { }
714 0 0 wantarray ? :
728 0 0 if defined $_
738 0 0 unless (defined $$CGI{'.allow_debug'})
747 0 0 if (not defined $pat) { }
0 0 elsif (ref $pat) { }
0 0 elsif ($pat eq '') { }
761 0 0 unless -r $fn
762 0 0 unless open my $fh, '<', $fn
768 0 0 unless /\S/
805 0 0 if $_[0] =~ m[/$]
813 0 0 unless (index($file, $rootdir) == 0)
821 0 0 if defined $elempath[0] and $elempath[0] eq ''
829 0 0 ref $_ eq 'ARRAY' ? :
0 1 $_ ? :
846 0 0 if $ENV{'VERBOSE'}
847 0 0 if (catch sub { $pack->run_template($pack->rel2abs($file), \%param, $config); } , \my($error))
852 0 0 if $ENV{'VERBOSE'}