Condition Coverage

blib/lib/CGI/Simple.pm
Criterion Covered Total %
condition 100 160 62.5


and 3 conditions

line !l l&&!r l&&r condition
183 15 63 0 $ENV{'GATEWAY_INTERFACE'} && $ENV{'GATEWAY_INTERFACE'} =~ m[^CGI-Perl/]
287 47 3 0 $method eq 'POST' and $$self{'.globals'}{'POST_MAX'} != -1
50 0 0 $method eq 'POST' and $$self{'.globals'}{'POST_MAX'} != -1 and $length > $$self{'.globals'}{'POST_MAX'}
303 8 42 0 $length and $type =~ m[^multipart/form-data]i
334 0 0 2 $$self{'.globals'}{'DEBUG'} and $data = $self->read_from_cmdline
370 4 0 338 defined $param and defined $value
377 380 4 4 $value eq '' and $$self{'.globals'}{'NO_UNDEF_PARAMS'}
554 7 12 12 $param =~ /^-name$/i and @p == 1
589 2 2 2 defined $param && $param =~ /^-name$/i
651 0 16 4 defined $p[0] && ref $p[0]
703 4 4 0 not $fh and defined $$self{'.upload_fields'}{$filename}
776 0 0 2 defined $ENV{'QUERY_STRING'} and $ENV{'REQUEST_METHOD'} eq 'POST'
796 0 0 4 $fh and fileno $fh
898 8 22 0 $$self{'.header_printed'}++ and $$self{'.globals'}{'HEADERS_ONCE'}
928 6 10 14 $type and $type =~ m[^text/]
16 0 14 $type and $type =~ m[^text/] and not $type =~ /\bcharset\b/
974 30 0 0 $$self{'.mod_perl'} and not $nph
1072 0 0 2 $_[0]{'.globals'}{'DEBUG'} == 1 and @ARGV
1251 4 2 0 defined $ENV{'SERVER_SOFTWARE'} and $ENV{'SERVER_SOFTWARE'} =~ /IIS/
1332 0 18 0 lc $protocol eq 'http' and $port == 80
18 0 0 lc $protocol eq 'https' and $port == 443
1343 18 0 24 $path_info and defined $path
1344 24 0 18 $query and $self->query_string

or 2 conditions

line l !l condition
282 39 11 $ENV{'CONTENT_TYPE'} || 'No CONTENT_TYPE received'
283 42 8 $ENV{'CONTENT_LENGTH'} || 0
284 48 2 $ENV{'REQUEST_METHOD'} || 'No REQUEST_METHOD received'
327 43 2 $ENV{'QUERY_STRING'} || $ENV{'REDIRECT_QUERY_STRING'} || ''
414 0 0 $ENV{'CONTENT_LENGTH'} || 0
478 0 0 $ENV{'CONTENT_LENGTH'} || 0
618 3 11 shift @_ || $$self{'.sep'} || "\000"
888 4 0 $ENV{'HTTP_COOKIE'} || $ENV{'COOKIE'} || ''
927 0 10 $type ||= 'text/html'
932 30 0 $ENV{'SERVER_PROTOCOL'} || 'HTTP/1.0'
933 4 6 $status || '200 OK'
1032 4 2 $boundary || '------- =_aaaaaaaaaa0'
1057 4 2 $type || 'text/html'
1265 32 8 $pref || 1

or 3 conditions

line l !l&&r !l&&!r condition
171 0 78 0 ref $class || $class
183 0 0 78 exists $ENV{'MOD_PERL'} || $ENV{'GATEWAY_INTERFACE'} && $ENV{'GATEWAY_INTERFACE'} =~ m[^CGI-Perl/]
303 43 2 2 $method eq 'GET' or $method eq 'HEAD'
327 41 2 2 $ENV{'QUERY_STRING'} || $ENV{'REDIRECT_QUERY_STRING'}
532 11 0 0 $^O || do {
618 2 1 11 shift @_ || $$self{'.sep'}
886 4 0 4 $$self{'.raw_cookies'}{$key} || ()
888 0 4 0 $ENV{'HTTP_COOKIE'} || $ENV{'COOKIE'}
913 10 20 0 $nph ||= $$self{'.globals'}{'NPH'}
962 8 0 22 defined $expires or $cookie
8 6 16 defined $expires or $cookie or $nph
964 8 0 22 $self->cache or $self->no_cache
1006 10 0 0 $url ||= $self->self_url
1114 4 2 0 &_shift_if_ref || 'CGI::Simple'->new
1212 2 0 0 $ENV{'REMOTE_HOST'} or $ENV{'REMOTE_ADDR'}
1218 58 0 0 $ENV{'SCRIPT_NAME'} or $0
1225 2 0 0 $ENV{'HTTP_FROM'} or $ENV{'REMOTE_IDENT'}
1236 2 0 0 $ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'}
1320 18 6 18 $relative || $absolute
0 18 24 $base or not $relative || $absolute
1332 0 0 18 lc $protocol eq 'http' and $port == 80 or lc $protocol eq 'https' and $port == 443