Branch Coverage

blib/lib/Catalyst/ActionRole/RequestModel.pm
Criterion Covered Total %
branch 56 80 70.0


line true false branch
26 0 2 if exists $controller->config->{'body_model_postfix'}
27 0 2 if $controller->can("default_body_postfix")
33 0 4 if exists $controller->config->{'body_model_prefix_namespace'}
34 0 4 if $controller->can("default_body_prefix_namespace")
45 0 2 if $controller->can("default_body_model")
48 0 2 if length $prefix and not $prefix =~ /::$/
56 0 2 if $ctx->debug
63 15 2 unless $model =~ /^~/
68 0 2 if length $prefix and not $prefix =~ /::$/
73 2 0 length "$prefix$namepart" ? :
75 0 2 if $ctx->debug
81 0 2 if exists $controller->config->{'query_model_postfix'}
82 0 2 if $controller->can("default_query_postfix")
88 0 4 if exists $controller->config->{'query_model_prefix_namespace'}
89 0 4 if $controller->can("default_query_prefix_namespace")
100 0 2 if $controller->can("default_query_model")
103 0 2 if length $prefix and not $prefix =~ /::$/
111 0 2 if $ctx->debug
118 6 2 unless $model =~ /^~/
123 0 2 if length $prefix and not $prefix =~ /::$/
128 2 0 length "$prefix$namepart" ? :
130 0 2 if $ctx->debug
140 0 1 unless exists $self->attributes->{'RequestModel'} or exists $self->attributes->{'QueryModel'} or exists $self->attributes->{'BodyModel'} or exists $self->attributes->{'QueryModelFor'} or exists $self->attributes->{'BodyModelFor'}
144 15 8 unless $self->attributes->{'RequestModel'}
145 17 6 unless $self->attributes->{'BodyModel'}
149 14 9 if (exists $self->attributes->{'RequestModel'} or exists $self->attributes->{'BodyModel'})
150 1 13 unless @models
156 22 1 unless $self->attributes->{'BodyModelFor'}
1 22 if (my($action_name) = @{[] unless $self->attributes->{'BodyModelFor'};})
163 9 14 if $ctx->req->method eq "GET" and not $request_content_type
169 1 14 unless lc $_ eq lc $request_content_type
174 6 8 if (exists $self->attributes->{'RequestModel'} or exists $self->attributes->{'BodyModelFor'} or exists $self->attributes->{'BodyModel'})
176 0 13 unless @matching_models
177 0 13 unless @matching_models
183 13 8 unless $self->attributes->{'QueryModel'}
185 8 13 if (exists $self->attributes->{'QueryModel'})
186 1 7 unless @qmodels
192 20 1 unless $self->attributes->{'QueryModelFor'}
1 20 if (my($action_name) = @{[] unless $self->attributes->{'QueryModelFor'};})
203 0 9 $_->has_content_type ? :