Branch Coverage

blib/lib/CGI/Application/Dispatch.pm
Criterion Covered Total %
branch 73 152 48.0


line true false branch
271 22 57 if ($arg eq 'args_to_new') { }
275 10 12 if ($$dispatch_args{'args_to_new'}{'PARAMS'})
279 9 1 unless $args{'args_to_new'}{'PARAMS'}
285 0 22 if ($$dispatch_args{'args_to_new'}{'TMPL_PATH'})
288 0 0 if ($args{'args_to_new'}{'TMPL_PATH'}) { }
289 0 0 unless (ref $args{'args_to_new'}{'TMPL_PATH'})
297 0 0 if (ref $$dispatch_args{'args_to_new'}{'TMPL_PATH'}) { }
315 45 12 unless exists $args{$arg}
319 0 22 $args{'debug'} ? :
324 0 1 if $_ eq 'prefix' or $_ eq 'default' or $_ eq 'debug' or $_ eq 'rm' or $_ eq 'args_to_new' or $_ eq 'table' or $_ eq 'auto_rest' or $_ eq 'auto_rest_lc' or $_ eq 'not_found' or $_ eq 'error_document'
339 0 22 if (exists $args{'not_found'})
341 0 0 unless exists $args{'error_document'}
352 2 20 if not $path_info or $path_info eq '/'
356 1 21 unless index($path_info, '/') == 0
357 21 1 unless substr($path_info, -1) eq '/'
364 1 21 unless $named_args = $self->_parse_path($path_info, $args{'table'})
369 1 21 if $output
371 0 21 if ($DEBUG)
378 0 21 if (exists $$named_args{'PARAMS'} or exists $$named_args{'TMPL_PATH'})
388 1 20 if ($$named_args{'*'})
394 1 20 unless $module
398 16 4 if $local_prefix
405 0 20 defined $$named_args{'auto_rest'} ? :
407 0 0 if ($auto_rest and defined $rm and length $rm)
408 0 0 defined $$named_args{'auto_rest_lc'} ? :
413 0 0 if $method_lc
422 0 2 unless (ref $e and $e->isa('Exception::Class::Base'))
451 0 3 $ENV{'REQUEST_URI'} ? :
455 3 0 $e->isa('CGI::Application::Dispatch::Exception') ? :
462 0 3 if ($errdoc)
464 0 0 if (do { index($str, '"') == 0 }) { }
0 0 elsif (index($str, '<') == 0) { }
473 0 0 if (-f $str and open FH, '<', $str) { }
484 0 0 if ($DEBUG)
485 0 0 if $url
487 0 0 if $output
562 0 3 unless exists $status_lines{$errno}
564 0 3 if ($url) { }
572 3 0 unless ($output)
578 0 3 $DEBUG ? :
0 3 $ENV{'SERVER_ADMIN'} ? :
599 3 0 $output =~ /
605 3 0 if length $output < 520
612 0 3 unless $ENV{'CGI_APP_RETURN_ONLY'}
623 0 22 unless defined $path
625 0 22 unless (ref $table eq 'ARRAY')
637 0 60 if ($rule =~ /$http_method_regex/)
641 0 0 unless lc $1 eq lc $self->_http_method
649 60 0 unless index($rule, '/') == 0
650 60 0 if substr($rule, -1) ne '/'
666 7 77 $4 ? :
671 9 51 if ($rule =~ m[/\*/$])
677 0 60 if $DEBUG
681 21 39 if (my(@values) = $path =~ /^$rule$/)
683 0 21 if $DEBUG
686 20 1 if @names
696 0 0 unless $ENV{'HTTP_REQUEST_METHOD'}
704 0 19 if ($DEBUG)
709 17 2 if ($rm)
713 0 17 unless $rm
717 0 19 if $DEBUG
721 19 0 ref $args eq 'HASH' ? :
722 17 2 if $rm
726 0 19 if ($@)
729 0 0 if (not ref $@ and $@ =~ /No such run mode/) { }
816 0 0 if $$config_args{$dir_var}
824 0 0 if $$config_args{'CGIAPP_DISPATCH_DEBUG'}
825 0 0 if ($DEBUG)
833 0 0 if ($r->status == 404) { }
0 0 elsif ($r->status == 500) { }
0 0 elsif ($r->status == 400) { }
935 0 20 unless $module
940 0 20 unless ($module)
944 0 20 if $DEBUG
946 19 1 unless $@
951 1 0 if ($@ =~ /Can't locate $module_path.pm/) { }