Branch Coverage

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


line true false branch
55 1 923 if (my $header = $self->header("Cookie"))
85 20339 1932 unless $header =~ /^(HTTP|CONTENT|COOKIE)/i
126 0 0 unless $self->method eq "POST" or $self->method eq "PUT" or $self->method eq "PATCH" or $self->method eq "DELETE"
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 918 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 923 0 $self->_has_env ? :
0 923 if (my $plack_body = $self->_has_env ? $self->env->{'plack.request.http.body'} : undef)
265 874 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 921 if $self->has_body_parameters
330 1 920 unless $self->_has_body
332 873 48 unless ($self->_body)
333 3 870 $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 924 1 if exists $env->{'REMOTE_HOST'}
395 7 918 $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) ? :
637 0 0 if (@_ == 0)
641 0 0 if (@_ == 1)
645 0 0 unless (exists $self->cookies->{$name})
792 0 14 if (@_ == 0)
799 16 1 defined $_ ? :
801 12 2 if (@params == 1) { }
1 1 elsif (@params > 1) { }
803 0 12 unless defined(my $param = shift @params)
806 2 10 unless (exists $self->parameters->{$param})
807 0 2 wantarray ? :
810 1 9 if (ref $self->parameters->{$param} eq 'ARRAY') { }
813 1 0 wantarray ? :
818 1 8 wantarray ? :
858 1 1988 if (@params) { }
1062 926 elsif ($self->_has_path) { }
940 1 7 if (@_ == 0)
944 7 0 if (@_ == 1)
948 1 6 unless (exists $self->uploads->{$upload})
949 0 1 wantarray ? :
952 0 6 if (ref $self->uploads->{$upload} eq 'ARRAY') { }
955 0 0 wantarray ? :
960 0 6 wantarray ? :
964 0 0 if (@_ > 1)
968 0 0 if (exists $self->uploads->{$field}) { }
970 0 0 unless ref $_ eq "ARRAY"
1022 0 22 unless $args
1025 10 16 unless defined $value
1026 2 14 ref $value eq 'ARRAY' ? :
1035 16 10 if (defined $val) { }
1037 2 14 if ($append and exists $params{$key}) { }
1044 0 2 ref $params{$key} eq 'ARRAY' ? :
1 1 ref $val eq 'ARRAY' ? :
1080 0 22 unless $args
1083 2 0 if (ref $behavior eq "HASH" and defined $behavior->{'mode'} and $behavior->{'mode'} eq "append")