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 1 $method eq 'POST' || $method eq 'PUT' and $self->{'.globals'}{'POST_MAX'} != -1
72 1 0 $method eq 'POST' || $method eq 'PUT' and $self->{'.globals'}{'POST_MAX'} != -1 and $length > $self->{'.globals'}{'POST_MAX'}
342 17 54 2 $length and $type =~ m[^multipart/form-data]i
388 3 0 2 $self->{'.globals'}{'DEBUG'} and $data = $self->read_from_cmdline
425 4 0 384 defined $param and defined $value
433 432 4 4 $value eq "" and $self->{'.globals'}{'NO_UNDEF_PARAMS'}
435 160 0 276 $self->{'.globals'}{'NO_NULL'} and $param ne "PUTDATA"
160 0 276 $self->{'.globals'}{'NO_NULL'} and $param ne "PUTDATA" and $param ne "POSTDATA"
437 436 0 0 $self->{'.globals'}{'PARAM_UTF8'} and $param ne "PUTDATA"
436 0 0 $self->{'.globals'}{'PARAM_UTF8'} and $param ne "PUTDATA" and $param ne "POSTDATA"
463 2 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 34 0 $self->{'.header_printed'}++ and $self->{'.globals'}{'HEADERS_ONCE'}
1038 6 15 18 $type and $type =~ m[^text/]
21 0 18 $type and $type =~ m[^text/] and not $type =~ /\bcharset\b/
1083 39 0 0 $self->{'.mod_perl'} and not $nph
1188 0 0 2 $_[0]{'.globals'}{'DEBUG'} == 1 and @ARGV
1372 8 2 0 defined $ENV{'SERVER_SOFTWARE'} and $ENV{'SERVER_SOFTWARE'} =~ /IIS/
1453 0 24 2 lc $protocol eq "http" and $port == 80
24 0 0 lc $protocol eq "https" and $port == 443
1466 27 0 35 $path_info and defined $path
1467 36 2 24 $query and $self->query_string

or 2 conditions

line l !l condition
50 0 62 $PARAM_UTF8 ||= 0
318 2 71 shift() || \*STDIN
321 56 17 $ENV{'CONTENT_TYPE'} || 'No CONTENT_TYPE received'
322 56 17 $ENV{'CONTENT_LENGTH'} || 0
323 68 5 $ENV{'REQUEST_METHOD'} || 'No REQUEST_METHOD received'
383 2 2 $ENV{'QUERY_STRING'} || $ENV{'REDIRECT_QUERY_STRING'} || ''
479 2 0 $ENV{'CONTENT_LENGTH'} || 0
555 3 0 $ENV{'CONTENT_LENGTH'} || 0
686 1 14 shift() || $self->{'.sep'} || "\000"
973 4 0 $ENV{'HTTP_COOKIE'} || $ENV{'COOKIE'} || ''
1037 0 12 $type ||= "text/html"
1042 34 5 $ENV{'SERVER_PROTOCOL'} || 'HTTP/1.0'
1043 4 10 $status || '200 OK'
1173 4 2 $type || 'text/html'
1384 32 8 $pref || 1

or 3 conditions

line l !l&&r !l&&!r condition
178 0 103 0 ref $class || $class
198 0 0 103 exists $ENV{'MOD_PERL'} || $ENV{'GATEWAY_INTERFACE'} && $ENV{'GATEWAY_INTERFACE'} =~ m[^CGI-Perl/]
326 13 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 15 0 0 $^O || do { require Config; $Config::Config{'osname'} }
971 4 0 4 $self->{'.raw_cookies'}{$key} || ()
1024 14 0 25 $nph ||= $self->{'.globals'}{'NPH'}
1072 8 1 30 defined $expires or $cookie
9 10 20 defined $expires or $cookie or $nph
1074 8 0 31 $self->cache or $self->no_cache
1116 11 2 0 $url ||= $self->self_url
1231 4 2 0 &_shift_if_ref || 'CGI::Simple'->new
1330 2 0 0 $ENV{'REMOTE_HOST'} or $ENV{'REMOTE_ADDR'}
1336 79 2 0 $ENV{'SCRIPT_NAME'} or $0
1343 2 0 0 $ENV{'HTTP_FROM'} or $ENV{'REMOTE_IDENT'}
1354 2 0 0 $ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'}
1440 27 9 26 $relative || $absolute
0 26 36 $base or not $relative || $absolute
1453 2 0 24 lc $protocol eq "http" and $port == 80 or lc $protocol eq "https" and $port == 443