Branch Coverage

blib/lib/CGI/Pure.pm
Criterion Covered Total %
branch 50 120 41.6


line true false branch
60 1 32 if (&none(sub { $_ eq $self->{'par_sep'}; } , @PAR_SEP))
83 0 9 defined $new_values[0] && ref $new_values[0] ? :
100 1 3 unless (defined $self->{'.parameters'}{$param})
120 25 51 unless (defined $param)
128 42 9 if (not @new_values) { }
129 4 38 unless (exists $self->{'.parameters'}{$param})
135 2 7 ref $new_values[0] eq 'ARRAY' ? :
141 22 25 wantarray ? :
147 4 1 if ($self->{'save_query_data'}) { }
170 0 0 unless ($ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data]imsx)
174 0 0 unless ($filename)
175 0 0 if ($writefile)
180 0 0 $self->{'.filehandles'} ? :
183 0 0 if ($fh) { }
188 0 0 unless ($writefile)
194 0 0 unless (open $out, '>', $writefile)
201 0 0 unless (close $out)
217 0 0 unless ($ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data]imsx)
222 0 0 unless ($filename)
225 0 0 if ($info =~ /mime/ism)
234 0 47 unless (defined $param)
237 45 2 if ($overwrite or not exists $self->{'.parameters'}{$param})
242 32 15 ref $value eq 'ARRAY' ? :
260 0 21 if ($length and $type =~ m[^multipart/form-data]imsx) { }
2 19 elsif ($method eq 'POST') { }
5 14 elsif ($method eq 'GET' or $method eq 'HEAD') { }
266 0 0 if ($length != $got_data_length)
277 0 2 if ($self->{'post_max'} != $POST_MAX_NO_LIMIT and $length > $self->{'post_max'}) { }
2 0 elsif ($length) { }
290 1 1 if ($self->{'save_query_data'})
295 0 2 if ($length != length $data)
303 1 4 if ($self->{'save_query_data'})
309 7 14 if ($data)
320 0 0 unless (defined $self->{'crlf'})
323 0 0 if ($CGI::Pure::OSNAME =~ /VMS/ism) { }
353 21 11 if (not defined $init) { }
6 5 elsif (ref $init eq 'HASH') { }
1 4 elsif (eval { do { $init->isa('CGI::Pure') } }) { }
383 0 0 unless ($boundary)
389 0 0 unless (exists $ENV{'HTTP_USER_AGENT'} and $ENV{'HTTP_USER_AGENT'} =~ / MSIE\s+ 3\.0[12]; \s* Mac /imsx)
409 0 0 if ($self->{'save_query_data'})
421 0 0 unless ($data =~ /^([\040-\176$CRLF]+?$CRLF$CRLF)/ms)
448 0 0 if ($filename)
465 0 0 if ($fh)
471 0 0 if ($size)
479 0 0 unless ($data =~ s/^\Q$header\E(.*?)$CRLF(?=$boundary)//s)
493 0 0 if ($self->{'utf8'}) { }
509 0 13 unless (defined $data)
519 15 2 if ($self->{'utf8'}) { }
520 7 8 if (ref $pairs_hr->{$key} eq 'ARRAY') { }
544 20 1 if (defined $value)
557 0 0 if ($self->{'disable_upload'}) { }
0 0 elsif ($filename) { }
563 0 0 if ($CGI::Pure::EVAL_ERROR)
567 0 0 unless ($fh)
575 0 0 unless ($data)
579 0 0 if ("$buffer$data" =~ /$boundary/ms)
585 0 0 unless ($data)
602 0 0 if ($1)
613 22 0 if ($self->{'utf8'}) { }