Branch Coverage

blib/lib/PAGI/Request/MultiPartHandler.pm
Criterion Covered Total %
branch 34 44 77.2


line true false branch
22 0 18 unless defined $args{'boundary'} and length $args{'boundary'}
24 0 18 unless defined $args{'receive'}
50 0 0 if $path and -f $path
63 18 29 unless $current_headers
70 17 12 if (defined $filename) { }
74 1 16 if $file_count > $self->{'max_files'}
77 1 15 if ($current_fh) { }
99 1 11 if $field_count > $self->{'max_fields'}
125 47 0 if ($line =~ /^([^:]+):\s*(.*)$/)
132 18 14 $cd =~ /filename=/i ? :
142 18 14 $current_is_file ? :
143 18 14 $current_is_file ? :
144 3 29 if $current_size > $max_size
148 1 28 if (not $current_fh and $current_size > $self->{'spool_threshold'})
156 0 1 unless print $current_fh $current_data
161 1 28 if ($current_fh) { }
162 0 1 unless print $current_fh $chunk
179 0 25 unless $message and $message->{'type'}
180 0 25 if $message->{'type'} eq "http.disconnect"
182 25 0 if (defined $message->{'body'} and length $message->{'body'})
186 15 7 unless $message->{'more'}
192 5 13 if (my $err = $@)