Branch Coverage

blib/lib/Mojo/Message.pm
Criterion Covered Total %
branch 81 88 92.0


line true false branch
25 3 999 $content->is_multipart ? :
1002 884 unless @_
28 1 883 if $content->is_multipart
37 8 317 if $self->{'body_params'}
43 42 275 if ($type =~ m[application/x-www-form-urlencoded]iu) { }
30 245 elsif ($type =~ m[multipart/form-data]iu) { }
67 0 133 if $self->content->is_multipart
69 5 128 @_ ? :
74 8871 197 unless @_
87 1239 4193 $self->{'finished'}++ ? :
92 0 2096 if $self->{'fix'}++
97 22 2074 if ($content->is_multipart) { }
50 2024 elsif ($content->is_chunked or $headers->content_length) { }
99 38 2008 if ($content->is_dynamic) { }
110 1214 1982 if not defined $chunk or length $chunk
134 0 74 if $self->content->is_multipart
136 11 63 $pointer ? :
142 5 2869 if $self->{'error'}
147 2214 655 unless ($self->{'state'})
151 44 2170 if $len < 0
152 3 2211 if $len > $self->max_line_size
154 2168 43 if $self->extract_start_line(\$self->{'buffer'})
159 2768 98 if $state eq "content" or $state eq "finished"
163 7 2859 if $max and $max < $self->{'raw_size'}
166 5 2854 if $self->headers->is_limit_exceeded
169 3 2851 if $self->content->is_limit_exceeded
171 2167 684 $self->emit('progress')->content->is_finished ? :
177 1 1 if $content->is_multipart
188 696 0 $charset ? :
222 1 277 unless defined(my $chunk = $self->$method($offset))
225 131 146 unless my $len = length $chunk
238 357 376 unless ($self->{$method})
244 581 152 $all ? :
247 18 0 if ++$_[0]{'limit'}
254 237 61 unless $content->is_multipart
261 61 151 if ($part->is_multipart)
266 0 151 unless my $disposition = $part->headers->content_disposition
268 62 89 if $upload and not defined $filename or not $upload and defined $filename
270 1 88 unless defined $name
271 54 34 unless $upload
273 88 0 if ($charset)
274 87 1 if $name
275 32 56 if $filename
276 54 34 unless $upload