Branch Coverage

blib/lib/EmbedIT/WebIT.pm
Criterion Covered Total %
branch 0 478 0.0


line true false branch
29 0 0 unless (defined %conf)
55 0 0 if (defined $conf{'USE_SSL'}) { }
61 0 0 unless (defined $Server)
66 0 0 if (defined $conf{'RUN_AS_USER'})
70 0 0 if (defined $conf{'RUN_AS_GROUP'})
96 0 0 if (defined $$self{'SERVER'}) { }
99 0 0 if ($$self{'CONF'}{'SERVERS'} == 0) { }
154 0 0 if ($pid == 0) { }
169 0 0 if ($$conf{'FORK_CONN'})
172 0 0 if ($pid == 0) { }
187 0 0 if ($$conf{'FORK_CONN'} == 0)
190 0 0 unless (defined $avoid)
194 0 0 if ($$conf{'FORK_CONN'} == 1) { }
200 0 0 if ($$conf{'FORK_CONN'} == 0)
234 0 0 if ($$conf{'USE_SSL'})
238 0 0 if ($$conf{'SERVERS'} > 0) { }
244 0 0 if ($$conf{'FORK_CONN'}) { }
248 0 0 if ($$conf{'WORKERS'} > 0) { }
255 0 0 if ($$conf{'WAIT_RESPONSE'}) { }
257 0 0 if ($$conf{'IMMED_CLOSE'}) { }
263 0 0 if (defined $$conf{'NO_WAIT_REPLY'}) { }
271 0 0 if ($$conf{'LOG_PACKETS'}) { }
0 0 elsif ($$conf{'LOG_HEADERS'}) { }
277 0 0 if (defined $$conf{'DOCUMENTS'}) { }
278 0 0 if (defined $$conf{'DOCUMENT_ROOT'}) { }
287 0 0 if (defined $$conf{'CGI_PATH'})
288 0 0 if ($$conf{'EMBED_PERL'}) { }
295 0 0 if (defined $$conf{'AUTH_PATH'}) { }
296 0 0 if (not defined $$conf{'AUTH_METHOD'}) { }
305 0 0 if (defined $$conf{'STARTUP'})
356 0 0 if (not defined @ret or @ret == 0)
365 0 0 if ($fh == $d) { }
367 0 0 if (defined $ns)
382 0 0 unless ($self->__fill_buffer($id, $fh, \%{$buffers{$no};}))
390 0 0 if ($buffers{$no}{'AutoClose'}) { }
397 0 0 if ($buffers{$no}{'OutBuffer'} ne '')
410 0 0 if ($size == 0) { }
412 0 0 if ($buffers{$no}{'CloseAfter'}) { }
421 0 0 unless ($self->__socket_write($id, $fh, $size, \%{$buffers{$no};}))
452 0 0 unless (defined @ret)
453 0 0 if (@ret == 0)
457 0 0 if (defined $c)
461 0 0 if ($pid == 0) { }
471 0 0 if ($ended > 0)
473 0 0 if ($EmbedIT::WebIT::childs[$i] == $ended)
510 0 0 if ($exit_loop)
512 0 0 if (not defined @ret or @ret == 0)
519 0 0 unless ($self->__fill_buffer($id, $fh, \%buffer))
527 0 0 if ($buffer{'AutoClose'}) { }
534 0 0 if ($buffer{'OutBuffer'} ne '')
547 0 0 if ($size == 0) { }
550 0 0 if ($buffer{'CloseAfter'})
557 0 0 unless ($self->__socket_write($id, $fh, $size, \%buffer))
582 0 0 if ($res < 0) { }
0 0 elsif ($res == 1) { }
611 0 0 if ($@)
617 0 0 if ($res) { }
618 0 0 if ($res == 0)
639 0 0 unless (defined $read)
642 0 0 if ($errno != 0)
649 0 0 if ($read == 0)
655 0 0 if ($$buf{'CLen'} < 0)
657 0 0 if (($pos = index($$buf{'InBuffer'}, "$CRLF$CRLF")) > 0) { }
658 0 0 if ($$buf{'InBuffer'} =~ /Content-Length:\s*(\d+)/io) { }
669 0 0 if ($$buf{'CLen'} >= 0) { }
671 0 0 if (length $$buf{'InBuffer'} < $expected)
702 0 0 if ($uri =~ /(.*?)\?(.*)/o) { }
718 0 0 if ($k ne '') { }
731 0 0 if ($$conf{'LOG_PACKETS'}) { }
734 0 0 if ($$conf{'LOG_HEADERS'})
752 0 0 if (not defined $$r{'METHOD'}) { }
755 0 0 if ($$conf{'WAIT_RESPONSE'} == 0) { }
765 0 0 if ($$conf{'IMMED_CLOSE'} or $$r{'HEADERS'}{'CONNECTION'} eq 'Close')
792 0 0 if ($path =~ m[/$]o)
796 0 0 if (exists $$conf{'DOCUMENTS'}{$path}) { }
799 0 0 if (defined $$conf{'DOCUMENT_ROOT'}) { }
802 0 0 if (not -e $fname) { }
803 0 0 if (exists $$conf{'DOCUMENTS'}{'*'}) { }
806 0 0 if ($path =~ /$$conf{'CGI_PATH'}/)
807 0 0 if ($$conf{'SETUP_ENV'})
816 0 0 if ($path =~ /$$conf{'CGI_PATH'}/)
817 0 0 if ($$conf{'SETUP_ENV'})
826 0 0 if (exists $$conf{'DOCUMENTS'}{'*'})
839 0 0 if ($auth_ok) { }
841 0 0 if ($$conf{'SETUP_ENV'})
852 0 0 if ($$r{'METHOD'} =~ /GET|HEAD|POST/o) { }
853 0 0 if ($script) { }
0 0 elsif ($embed) { }
854 0 0 if ($$conf{'EMBED_PERL'} == 1 and $path =~ /\.pl$/o) { }
857 0 0 unless ($retval)
859 0 0 if ($err)
866 0 0 unless ($retval)
868 0 0 if ($err)
876 0 0 unless ($retval)
878 0 0 if ($err)
885 0 0 unless ($retval)
887 0 0 if ($err)
895 0 0 if ($err)
919 0 0 if (defined $h)
923 0 0 unless wantarray
937 0 0 unless (defined $$conf{'AUTH_PATH'})
944 0 0 if ($path =~ /$$conf{'AUTH_PATH'}/)
948 0 0 if (not defined $user) { }
953 0 0 if (not defined $auth_f) { }
0 0 elsif (&$auth_f($user, $pass)) { }
954 0 0 if ($$conf{'SETUP_ENV'})
960 0 0 if ($$conf{'SETUP_ENV'})
966 0 0 if ($err)
987 0 0 if (exists $$conf{'EXPIRATIONS'})
988 0 0 if (exists $$conf{'EXPIRATIONS'}{$type}) { }
991 0 0 if (exists $$conf{'EXPIRATIONS'}{'ALL'})
1011 0 0 if ($$conf{'WAIT_RESPONSE'} == 0)
1015 0 0 unless (defined $$conf{'DOCUMENT_ROOT'})
1021 0 0 if (-e $p)
1024 0 0 if ($$r{'METHOD'} eq 'HEAD') { }
1036 0 0 if ($$r{'HEADERS'}{'IF-MODIFIED-SINCE'} eq $mdate)
1039 0 0 if (defined $expiration and $expiration =~ /\d+/)
1052 0 0 unless (defined $res)
1056 0 0 if (length $res > 0)
1057 0 0 if ($enc ne '')
1064 0 0 if (defined $expiration and $expiration =~ /\d+/)
1093 0 0 unless (defined $sub)
1097 0 0 if (defined $sub and exists &$sub) { }
1099 0 0 if ($$r{'METHOD'} =~ /GET|HEAD/o) { }
1104 0 0 if ($$r{'METHOD'} =~ /GET/o)
1105 0 0 if ($$r{'HEADERS'}{'IF-MODIFIED-SINCE'} eq time2str($$self{'START_TIME'}))
1111 0 0 if (exists $$conf{'EXPIRATIONS'}{'ALL'})
1114 0 0 if (defined $expiration and $expiration =~ /\d+/)
1122 0 0 if ($$conf{'SETUP_ENV'})
1123 0 0 if (exists $$r{'HEADERS'}{'CONTENT-TYPE'})
1124 0 0 if (exists $$r{'HEADERS'}{'CONTENT-ENCODING'})
1125 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LENGTH'})
1126 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LANGUAGE'})
1152 0 0 if ($$self{'HAS_CGI_PM'}) { }
1156 0 0 if ($k eq 'CGI.pm')
1181 0 0 if ($$conf{'SETUP_ENV'})
1191 0 0 if (length $errs > 0)
1195 0 0 if ($$conf{'WAIT_RESPONSE'} == 0)
1197 0 0 if ($evalerrs ne '') { }
1200 0 0 if ($$r{'METHOD'} eq 'HEAD') { }
1226 0 0 if (-e $s) { }
1228 0 0 if ($$r{'METHOD'} =~ /GET|HEAD/o) { }
1233 0 0 if ($$conf{'SETUP_ENV'})
1234 0 0 if (exists $$r{'HEADERS'}{'CONTENT-TYPE'})
1235 0 0 if (exists $$r{'HEADERS'}{'CONTENT-ENCODING'})
1236 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LENGTH'})
1237 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LANGUAGE'})
1241 0 0 unless (defined $script)
1266 0 0 if ($$self{'HAS_CGI_PM'}) { }
1270 0 0 if ($k eq 'CGI.pm')
1293 0 0 if ($$conf{'SETUP_ENV'})
1303 0 0 if (length $errs > 0)
1307 0 0 if ($$conf{'WAIT_RESPONSE'} == 0)
1309 0 0 if ($evalerrs ne '') { }
1312 0 0 if ($$r{'METHOD'} eq 'HEAD') { }
1338 0 0 if (-e $s) { }
1340 0 0 if ($$r{'METHOD'} =~ /GET|HEAD/o) { }
1345 0 0 if ($$conf{'SETUP_ENV'})
1346 0 0 if (exists $$r{'HEADERS'}{'CONTENT-TYPE'})
1347 0 0 if (exists $$r{'HEADERS'}{'CONTENT-ENCODING'})
1348 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LENGTH'})
1349 0 0 if (exists $$r{'HEADERS'}{'CONTENT-LANGUAGE'})
1361 0 0 if ($$r{'METHOD'} =~ /GET|HEAD/o) { }
1362 0 0 unless $pid = IPC::Open3::open3($IN, $OUT, $ERR, $s, $p)
1364 0 0 unless $pid = IPC::Open3::open3($IN, $OUT, $ERR, $s)
1378 0 0 unless (defined $line)
1382 0 0 if ($fh == $OUT) { }
0 0 elsif ($fh == $ERR) { }
1387 0 0 if ($$conf{'SETUP_ENV'})
1395 0 0 if (length $errs > 0)
1399 0 0 if ($$conf{'WAIT_RESPONSE'} == 0)
1401 0 0 if ($$r{'METHOD'} eq 'HEAD') { }
1424 0 0 if ($auth)
1434 0 0 if (defined $headers)
1435 0 0 if (ref $headers eq 'HASH') { }
0 0 elsif (ref $headers eq '') { }
1445 0 0 if (defined $cont)
1448 0 0 if ($cont eq '' and $split eq '')
1453 0 0 if ($hr ne '')
1463 0 0 if ($$conf{'LOG_PACKETS'}) { }
1466 0 0 if ($$conf{'LOG_HEADERS'})
1487 0 0 if ($$conf{'SETUP_ENV'})
1494 0 0 if (exists $$conf{'ERROR_PAGES'})
1495 0 0 if (exists $$conf{'ERROR_PAGES'}{$code} and -e $$conf{'DOCUMENT_ROOT'} . $$conf{'ERROR_PAGES'}{$code} || exists $$conf{'DOCUMENTS'}{$$conf{'ERROR_PAGES'}{$code}}) { }
0 0 elsif (exists $$conf{'ERROR_PAGES'}{'ALL'} and -e $$conf{'DOCUMENT_ROOT'} . $$conf{'ERROR_PAGES'}{'ALL'} || exists $$conf{'DOCUMENTS'}{$$conf{'ERROR_PAGES'}{'ALL'}}) { }
1503 0 0 if (defined $page)
1516 0 0 if (defined $page)
1547 0 0 if (defined $$rconf{'STARTUP'})
1549 0 0 unless ($self->__load_startup)
1555 0 0 if (defined $f)
1592 0 0 if (length $errs > 0)
1614 0 0 if (defined $f)
1649 0 0 if (length $errs > 0)
1666 0 0 unless (defined $$rconf{'SERVER_NAME'})
1669 0 0 unless (defined $$rconf{'SERVER_IP'})
1672 0 0 unless (defined $$rconf{'SERVER_PORT'})
1675 0 0 unless (defined $$rconf{'WAIT_RESPONSE'})
1678 0 0 unless (defined $$rconf{'NO_WAIT_REPLY'})
1681 0 0 unless (defined $$rconf{'IMMED_CLOSE'})
1684 0 0 unless (defined $$rconf{'SOFTWARE'})
1687 0 0 unless (defined $$rconf{'SIGNATURE'})
1690 0 0 unless (defined $$rconf{'PROC_PREFIX'})
1694 0 0 unless (defined $$rconf{'EMBED_PERL'})
1697 0 0 unless (defined $$rconf{'QUEUE_SIZE'})
1700 0 0 if (defined $$rconf{'DOCUMENT_ROOT'}) { }
1701 0 0 unless ($$rconf{'DOCUMENT_ROOT'} =~ m[/$])
1708 0 0 unless (defined $$rconf{'SETUP_ENV'})
1712 0 0 if (length $$rconf{'STARTUP'} > 0)
1716 0 0 unless (defined $$rconf{'ENV_KEEP'})
1720 0 0 unless (defined $$rconf{'ENV_ADD'})
1724 0 0 unless (defined $$rconf{'MIME_TYPES'})
1728 0 0 unless (defined $$rconf{'SERVERS'})
1732 0 0 unless (defined $$rconf{'WORKERS'})
1736 0 0 unless (defined $$rconf{'FORK_CONN'})
1740 0 0 if ($$rconf{'FORK_CONN'})
1744 0 0 unless (defined $$rconf{'USE_SSL'})
1750 0 0 unless (defined $$rconf{'LOG_METHOD'})
1751 0 0 if ($$rconf{'NO_LOGGING'}) { }
1757 0 0 unless (defined $$rconf{'DEBLOG_METHOD'})
1761 0 0 unless (defined $$rconf{'LOG_HEADERS'})
1765 0 0 unless (defined $$rconf{'LOG_PACKETS'})
1769 0 0 if ($$rconf{'LOG_PACKETS'})
1773 0 0 if (defined $$rconf{'CGI_PATH'})
1786 0 0 if (defined $$rconf{'AUTH_PATH'})
1799 0 0 if (not exists $$rconf{'HTML_CODES'})
1856 0 0 if ($k eq $w)
1858 0 0 unless ($found)
1861 0 0 if ($$conf{'SETUP_ENV'})
1870 0 0 if ($$conf{'EMBED_PERL'})
1887 0 0 unless ($k =~ /CONTENT-LENGTH|COOKIE/)
1894 0 0 if (exists $$r{'HEADERS'}{'COOKIE'}) { }
1927 0 0 unless (defined $scr)
1963 0 0 if (length $errs > 0)
1967 0 0 if ($evalerr ne '')
1980 0 0 unless (defined $uid)
1982 0 0 unless (defined $uid)
1998 0 0 unless (defined $gid)
2000 0 0 unless (defined $gid)
2020 0 0 if (ref $self eq '') { }