Condition Coverage

blib/lib/PAGI/App/Router.pm
Criterion Covered Total %
condition 58 85 68.2


and 3 conditions

line !l l&&!r l&&r condition
108 15 2 3 builtin::blessed($app_or_router) and $app_or_router->isa("PAGI::App::Router")
139 5 1 4 @rest >= 2 and not ref $rest[-2]
6 0 4 @rest >= 2 and not ref $rest[-2] and $rest[-2] eq "method"
159 4 0 6 builtin::blessed($target) and $target->isa("PAGI::App::Router")
184 0 0 1 builtin::blessed($router_obj) and $router_obj->isa("PAGI::App::Router")
356 0 1 39 defined $name and length $name
391 0 0 9 defined $namespace and length $namespace
394 6 0 3 $self->{'_last_group_names'} and @{$self->{'_last_group_names'};}
493 10 0 1 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
509 0 0 0 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
525 0 0 0 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
535 177 0 57 @args == 2 and ref $args[0] eq "ARRAY"
554 2 1 2 builtin::blessed($mw) and $mw->can("call")
572 0 119 42 $middlewares and @$middlewares

or 2 conditions

line l !l condition
143 4 6 $opts{'method'} // "*"
184 0 0 ref $router_obj || 'scalar'
196 1 0 ref $target || 'scalar'
338 146 0 $route->{'constraints'} // []
12 134 $route->{'_user_constraints'} // []
341 28 0 $params->{$name} // (return 0)
376 0 8 $route->{'_user_constraints'} //= []
424 6 0 $info->{'prefix'} // ""
439 19 13 $path_params //= {}
440 4 28 $query_params //= {}
446 31 0 $info->{'prefix'} // ""
563 2 1 ref $mw || 'scalar'
627 15 0 $1 // "/"
631 3 12 $scope->{'root_path'} // ""
642 80 84 $scope->{'type'} // "http"
643 143 21 $scope->{'method'} // ""
644 163 1 $scope->{'path'} // "/"

or 3 conditions

line l !l&&r !l&&!r condition
454 11 3 1 $path =~ s/:$param_name\b/$value/ or $path =~ s/\{$param_name(?::[^}]*)?\}/$value/
626 1 14 2 $path eq $prefix or $path =~ m[^\Q$prefix\E(/.*)$]
748 98 0 10 $route_method eq '*' || $route_method eq $match_method || $route_method eq $method