Branch Coverage

blib/lib/CGI/Application/Dispatch/PSGI.pm
Criterion Covered Total %
branch 83 118 70.3


line true false branch
121 11 32 if ($arg eq 'args_to_new') { }
125 2 9 if ($$dispatch_args{'args_to_new'}{'PARAMS'})
129 1 1 unless $args{'args_to_new'}{'PARAMS'}
135 0 11 if ($$dispatch_args{'args_to_new'}{'TMPL_PATH'})
138 0 0 if ($args{'args_to_new'}{'TMPL_PATH'}) { }
139 0 0 unless (ref $args{'args_to_new'}{'TMPL_PATH'})
147 0 0 if (ref $$dispatch_args{'args_to_new'}{'TMPL_PATH'}) { }
165 20 12 unless exists $args{$arg}
169 0 11 $args{'debug'} ? :
174 1 0 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'
193 3 25 if not $path_info or $path_info eq '/'
197 1 27 unless index($path_info, '/') == 0
198 27 1 unless substr($path_info, -1) eq '/'
204 2 26 unless $named_args = $self->_parse_path($path_info, $args{'table'}, $env)
207 2 26 if (my $e = 'HTTP::Exception'->caught)
211 0 26 if ($DEBUG)
216 0 26 if (exists $$named_args{'PARAMS'} or exists $$named_args{'TMPL_PATH'})
230 1 25 if ($$named_args{'*'})
236 0 26 unless $module
240 22 4 if $local_prefix
247 3 23 defined $$named_args{'auto_rest'} ? :
249 3 1 if ($auto_rest and defined $rm and length $rm)
250 1 2 defined $$named_args{'auto_rest_lc'} ? :
255 1 2 if $method_lc
263 3 23 if (my $e = 'HTTP::Exception'->caught) { }
0 23 elsif ($e = 'Exception::Class'->caught) { }
267 0 0 ref $e ? :
351 0 5 $ENV{'REQUEST_URI'} ? :
355 5 0 $e->isa('HTTP::Exception::Base') ? :
356 5 0 $e->isa('HTTP::Exception::Base') ? :
360 4 1 if $e->code == 404
361 0 5 if $e->code == 500
372 0 28 unless defined $path
374 0 28 unless (ref $table eq 'ARRAY')
386 7 70 if ($rule =~ /$http_method_regex/)
390 3 4 unless lc $1 eq lc $$env{'REQUEST_METHOD'}
398 74 0 unless index($rule, '/') == 0
399 74 0 if substr($rule, -1) ne '/'
415 10 90 $4 ? :
420 9 65 if ($rule =~ m[/\*/$])
426 0 74 if $DEBUG
430 26 48 if (my(@values) = $path =~ /^$rule$/)
432 0 26 if $DEBUG
435 25 1 if @names
447 0 24 if ($DEBUG)
452 21 3 if ($rm)
456 0 21 unless $rm
461 0 24 if $DEBUG
466 9 15 if (ref $args eq 'HASH' and not defined $$args{'QUERY'}) { }
15 0 elsif (ref $args eq 'HASH') { }
478 21 3 if $rm
484 1 23 if ($e = 'HTTP::Exception'->caught) { }
491 0 23 if (not ref $e and $e =~ /No such run mode/) { }
0 23 elsif (defined $e and length $e) { }
596 0 26 unless $module
601 0 26 unless ($module)
605 0 26 if $DEBUG
607 24 2 unless $@
612 2 0 if ($@ =~ /Can't locate $module_path.pm/) { }