Branch Coverage

blib/lib/Catalyst/Request.pm
Criterion Covered Total %
branch 107 148 72.3


line true false branch
55 1 921 if (my $header = $self->header("Cookie"))
85 20295 1928 unless $header =~ /^(HTTP|CONTENT|COOKIE)/i
126 0 0 unless $self->method eq "POST" or $self->method eq "PUT" or $self->method eq "PATCH"
131 6 1 if ($match) { }
157 49 63 if ($remaining <= 0)
161 12 51 $remaining > $maxlength ? :
163 63 0 if (defined $rc) { }
164 1 62 if (0 == $rc)
223 4 916 if ($self->_use_hash_multivalue)
230 12 106 ref $param eq 'ARRAY' ? :
236 4 50 ref $param eq 'ARRAY' ? :
237 5 49 if (my $existing = $parameters->{$name})
238 2 3 ref $existing eq 'ARRAY' ? :
240 7 47 @values > 1 ? :
256 921 0 $self->_has_env ? :
0 921 if (my $plack_body = $self->_has_env ? $self->env->{'plack.request.http.body'} : undef)
265 872 49 unless my $length = $self->_read_length
270 49 0 unless ($self->_body)
279 1 48 if $self->_has_uploadtmp
288 0 49 if ($self->env->{'psgix.input.buffered'}) { }
299 0 51 unless $stream_buffer
301 0 51 unless $stream_buffer->print($chunk)
307 49 0 if ($stream_buffer) { }
316 1 48 if ($remaining > 0)
329 2 919 if $self->has_body_parameters
330 1 918 unless $self->_has_body
332 871 48 unless ($self->_body)
333 3 868 $self->_use_hash_multivalue ? :
340 11 37 if (scalar %part_data and not $c->config->{'skip_complex_post_part_handling'}) { }
343 1 20 (ref $proto_value || '') eq 'ARRAY' ? :
346 21 0 if $c and $c->encoding and not $c->config->{'skip_body_param_unicode_decoding'}
348 1 20 if (@extra) { }
371 36 0 if ($c and $c->encoding and not $c->config->{'skip_body_param_unicode_decoding'})
376 1 46 $self->_use_hash_multivalue ? :
380 47 0 unless $self->has_body_parameters
391 922 1 if exists $env->{'REMOTE_HOST'}
395 7 916 $env->{'psgi.url_scheme'} eq 'https' ? :
431 0 631 unless $self->_has_body
432 0 631 if scalar @_
433 29 602 &blessed(scalar $self->_body) ? :
635 0 0 if (@_ == 0)
639 0 0 if (@_ == 1)
643 0 0 unless (exists $self->cookies->{$name})
790 0 14 if (@_ == 0)
797 16 1 defined $_ ? :
799 12 2 if (@params == 1) { }
1 1 elsif (@params > 1) { }
801 0 12 unless defined(my $param = shift @params)
804 2 10 unless (exists $self->parameters->{$param})
805 0 2 wantarray ? :
808 1 9 if (ref $self->parameters->{$param} eq 'ARRAY') { }
811 1 0 wantarray ? :
816 1 8 wantarray ? :
856 1 1984 if (@params) { }
1060 924 elsif ($self->_has_path) { }
938 1 7 if (@_ == 0)
942 7 0 if (@_ == 1)
946 1 6 unless (exists $self->uploads->{$upload})
947 0 1 wantarray ? :
950 0 6 if (ref $self->uploads->{$upload} eq 'ARRAY') { }
953 0 0 wantarray ? :
958 0 6 wantarray ? :
962 0 0 if (@_ > 1)
966 0 0 if (exists $self->uploads->{$field}) { }
968 0 0 unless ref $_ eq "ARRAY"
1020 0 22 unless $args
1023 10 16 unless defined $value
1024 2 14 ref $value eq 'ARRAY' ? :
1033 16 10 if (defined $val) { }
1035 2 14 if ($append and exists $params{$key}) { }
1042 0 2 ref $params{$key} eq 'ARRAY' ? :
1 1 ref $val eq 'ARRAY' ? :
1078 0 22 unless $args
1081 2 0 if (ref $behavior eq "HASH" and defined $behavior->{'mode'} and $behavior->{'mode'} eq "append")