Branch Coverage

blib/lib/CGI/Application/Plugin/REST.pm
Criterion Covered Total %
branch 89 90 98.8


line true false branch
132 1 5 if (exists $ENV{'CAP_DEVPOPUP_EXEC'})
160 4 2 if ($param ne $params[0])
190 1 39 unless (exists $$self{'__rest_dispatch_table'})
215 4 53 $4 ? :
219 25 141 if ($rule =~ m[/[*] .* $]msx)
225 38 128 if (my(@values) = $path =~ /^$rule$/msx)
233 28 10 if (exists $$table{$method}) { }
9 1 elsif (exists $$table{'*'}) { }
250 6 31 if (not defined $preferred or $preferred eq '')
255 2 35 unless (defined $rm_name)
261 2 33 if (ref $rm_name eq 'CODE') { }
267 1 34 unless (defined $sub)
277 15 19 if (@names)
328 48 6 unless (exists $$self{'__rest_error_mode'})
333 54 0 if (defined $error_mode)
388 17 37 unless (exists $$self{'__rest_params'})
393 49 5 if ($num_args) { }
394 1 48 if (ref $args[0] eq 'HASH') { }
15 33 elsif ($num_args % 2 == 0) { }
32 1 elsif ($num_args == 1) { }
403 26 6 if (exists $$self{'__rest_params'}{$args[0]})
414 4 1 wantarray ? :
589 46 1 if ($num_args) { }
590 3 43 if (ref $args[0] eq 'HASH') { }
21 22 elsif ($num_args % 2 == 0) { }
21 1 elsif ($num_args == 1) { }
608 2 42 unless ($resource)
612 21 21 unless ($prefix)
616 21 21 unless ($id)
651 22 23 if (exists $$args{'in_types'}) { }
652 1 21 if (ref $$args{'in_types'} ne 'ARRAY')
660 22 22 if (exists $$args{'out_types'}) { }
661 1 21 if (ref $$args{'out_types'} ne 'ARRAY')
849 89 1 if ($num_routes)
850 61 28 if (ref $routes[0] eq 'HASH') { }
27 1 elsif ($num_routes % 2 == 0) { }
875 270 60 if ($route_type eq 'HASH') { }
19 41 elsif ($route_type eq 'CODE') { }
40 1 elsif ($route_type eq '') { }
894 572 1 if (scalar grep({$_ eq $req;} @request_methods)) { }
911 393 179 if ($subroute_type eq 'HASH') { }
19 160 elsif ($subroute_type eq 'CODE') { }
159 1 elsif ($subroute_type eq '') { }
1015 39 128 unless (exists $$self{'__rest_route_prefix'})
1020 1 166 if (defined $prefix)