Branch Coverage

blib/lib/CGI/Test.pm
Criterion Covered Total %
branch 60 112 53.5


line true false branch
54 0 25 unless $uri->scheme eq 'http' or $uri->scheme eq 'https'
65 23 2 unless defined $env
90 298 2 unless exists $env->{$key}
215 69 0 $dir =~ s[^/][] ? :
219 0 119 if $item eq '.'
220 0 119 if ($item eq '..') { }
303 0 44 unless $u->scheme eq 'http'
313 0 44 unless $userver eq $server
316 0 44 unless substr($upath, 0, length $base_path) eq $base_path
335 44 3 if (-e 'File::Spec'->catfile($cgi_dir, @script, $item)) { }
350 0 44 unless -f $script
351 0 44 unless -x $script
363 2 42 if (defined $input)
366 0 2 if (&WINDOWS()) { }
381 0 2 unless (pipe PREAD, PWRITE)
401 0 44 if &WINDOWS()
411 0 44 unless defined $pid
420 16 28 if ($pid == 0)
421 1 15 if defined $input and not &WINDOWS()
441 28 0 unless &WINDOWS()
443 1 27 if (defined $input and not &WINDOWS())
447 0 1 unless close PWRITE
452 0 28 if ($pid != $child)
455 0 0 unless kill 'TERM', $pid
456 0 0 unless unlink $in_fname
457 0 0 unless unlink $out_fname
466 0 28 unless (scalar keys %$header)
469 0 0 unless unlink $in_fname
470 0 0 unless unlink $out_fname
478 0 28 if (my($status) = ($header->{'Status'} || '') =~ /^(5\d\d)/)
499 0 28 if chop $@
509 0 28 if ($in_fname)
510 0 0 unless unlink $in_fname
513 0 28 unless unlink $out_fname
554 16 0 unless (&WINDOWS())
555 1 15 if (defined $in) { }
557 0 1 unless open STDIN, '<&=' . fileno($in)
562 0 15 unless open STDIN, $devnull
564 0 16 unless open STDOUT, '>&=' . fileno($out)
581 1 15 if (defined $input) { }
597 1 15 defined $input ? :
603 16 0 if (length $path) { }
612 1 15 if (defined $user) { }
622 12 4 if (defined $u->query) { }
647 0 16 &WINDOWS() ? :
649 167 0 -e $_ ? :
665 0 16 unless chdir $directory
667 0 16 if (&WINDOWS()) { }
668 0 0 $input ? :
697 0 28 unless open FILE, $file
703 28 44 if /^\015?\012$/ or /^\015\012$/
705 0 44 if (s/^\s+/ /) { }
44 0 elsif (($field, my $value) = /^([\w-]+)\s*:\s*(.*)/) { }
707 0 0 if $field eq ''
708 0 0 if $field ne ''
713 0 44 if (exists $header{$field})