Condition Coverage

blib/lib/CGI/Simple.pm
Criterion Covered Total %
condition 118 171 69.0


and 3 conditions

line !l l&&!r l&&r condition
326 59 13 3 $method eq 'POST' || $method eq 'PUT' and $self->{'.globals'}{'POST_MAX'} != -1
72 3 0 $method eq 'POST' || $method eq 'PUT' and $self->{'.globals'}{'POST_MAX'} != -1 and $length > $self->{'.globals'}{'POST_MAX'}
342 17 54 4 $length and $type =~ m[^multipart/form-data]i
388 3 0 2 $self->{'.globals'}{'DEBUG'} and $data = $self->read_from_cmdline
425 4 0 385 defined $param and defined $value
433 433 4 4 $value eq "" and $self->{'.globals'}{'NO_UNDEF_PARAMS'}
435 160 0 277 $self->{'.globals'}{'NO_NULL'} and $param ne "PUTDATA"
160 0 277 $self->{'.globals'}{'NO_NULL'} and $param ne "PUTDATA" and $param ne "POSTDATA"
437 437 0 0 $self->{'.globals'}{'PARAM_UTF8'} and $param ne "PUTDATA"
437 0 0 $self->{'.globals'}{'PARAM_UTF8'} and $param ne "PUTDATA" and $param ne "POSTDATA"
463 4 0 0 exists $ENV{'HTTP_USER_AGENT'} and $ENV{'HTTP_USER_AGENT'} =~ /MSIE\s+3\.0[12];\s*Mac/i
632 10 15 15 $param =~ /^-name$/i and @p == 1
657 2 2 2 defined $param && $param =~ /^-name$/i
727 0 16 4 defined $p[0] && ref $p[0]
780 4 4 0 not $fh and defined $self->{'.upload_fields'}{$filename}
852 0 0 2 defined $ENV{'QUERY_STRING'} and $ENV{'REQUEST_METHOD'} eq "POST"
872 0 0 4 $fh and fileno $fh
984 11 41 0 $self->{'.header_printed'}++ and $self->{'.globals'}{'HEADERS_ONCE'}
1040 6 15 20 $type and $type =~ m[^text/]
21 0 20 $type and $type =~ m[^text/] and not $type =~ /\bcharset\b/
1085 41 0 0 $self->{'.mod_perl'} and not $nph
1190 0 0 2 $_[0]{'.globals'}{'DEBUG'} == 1 and @ARGV
1374 8 2 0 defined $ENV{'SERVER_SOFTWARE'} and $ENV{'SERVER_SOFTWARE'} =~ /IIS/
1455 0 24 2 lc $protocol eq "http" and $port == 80
24 0 0 lc $protocol eq "https" and $port == 443
1468 27 0 35 $path_info and defined $path
1469 36 2 24 $query and $self->query_string

or 2 conditions

line l !l condition
50 0 64 $PARAM_UTF8 ||= 0
318 2 73 shift() || \*STDIN
321 58 17 $ENV{'CONTENT_TYPE'} || 'No CONTENT_TYPE received'
322 58 17 $ENV{'CONTENT_LENGTH'} || 0
323 70 5 $ENV{'REQUEST_METHOD'} || 'No REQUEST_METHOD received'
383 2 2 $ENV{'QUERY_STRING'} || $ENV{'REDIRECT_QUERY_STRING'} || ''
479 4 0 $ENV{'CONTENT_LENGTH'} || 0
555 4 0 $ENV{'CONTENT_LENGTH'} || 0
686 1 14 shift() || $self->{'.sep'} || "\000"
973 4 0 $ENV{'HTTP_COOKIE'} || $ENV{'COOKIE'} || ''
1039 0 14 $type ||= "text/html"
1044 34 7 $ENV{'SERVER_PROTOCOL'} || 'HTTP/1.0'
1045 4 10 $status || '200 OK'
1175 4 2 $type || 'text/html'
1386 32 8 $pref || 1

or 3 conditions

line l !l&&r !l&&!r condition
178 0 105 0 ref $class || $class
198 0 0 105 exists $ENV{'MOD_PERL'} || $ENV{'GATEWAY_INTERFACE'} && $ENV{'GATEWAY_INTERFACE'} =~ m[^CGI-Perl/]
326 15 1 59 $method eq 'POST' || $method eq 'PUT'
342 11 1 59 $method eq "POST" or $method eq "PUT"
52 2 5 $method eq "GET" or $method eq "HEAD"
610 17 0 0 $^O || do { require Config; $Config::Config{'osname'} }
971 4 0 4 $self->{'.raw_cookies'}{$key} || ()
1026 14 0 27 $nph ||= $self->{'.globals'}{'NPH'}
1074 8 1 32 defined $expires or $cookie
9 10 22 defined $expires or $cookie or $nph
1076 8 0 33 $self->cache or $self->no_cache
1118 11 2 0 $url ||= $self->self_url
1233 4 2 0 &_shift_if_ref || 'CGI::Simple'->new
1332 2 0 0 $ENV{'REMOTE_HOST'} or $ENV{'REMOTE_ADDR'}
1338 79 2 0 $ENV{'SCRIPT_NAME'} or $0
1345 2 0 0 $ENV{'HTTP_FROM'} or $ENV{'REMOTE_IDENT'}
1356 2 0 0 $ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'}
1442 27 9 26 $relative || $absolute
0 26 36 $base or not $relative || $absolute
1455 2 0 24 lc $protocol eq "http" and $port == 80 or lc $protocol eq "https" and $port == 443