Branch Coverage

blib/lib/HTTP/ProxyTest.pm
Criterion Covered Total %
branch 15 72 20.8


line true false branch
241 0 1 unless my($ip) = $ENV{'REMOTE_ADDR'} =~ /^(\d+(?:\.\d+){3})$/
242 0 1 unless my $args = &arguments
246 0 1 if $$white{$ip}
253 0 3 if ($res->is_success and index($res->content, $$args{'content_substr'}) >= 0)
288 0 1 unless @_ % 2 == 0
293 0 0 unless $valid_keys{$key}
297 0 1 if ($args{'nmap'})
298 0 0 unless -f $args{'nmap'}
299 0 0 unless -x $args{'nmap'}
303 2 0 unless $args{$_}
305 0 0 $_ eq 'whitelist' ? :
306 0 0 if (-f $file)
307 0 0 if -r $file and -w _
313 0 0 if (-d $dir)
314 0 0 if -r $dir and -w _ and -x _
323 0 2 if (exists $args{$_}) { }
324 0 0 unless ref $args{$_} eq 'ARRAY'
326 0 0 unless $err == 0
331 0 1 unless $args{'primary'}[0] or $args{'secondary'}[0]
333 0 1 unless ($args{'nmap'} or $args{'primary'}[0])
338 0 2 if ($args{$_}) { }
339 0 0 unless $args{$_} =~ /^\d+$/
354 0 1 unless ($res->is_success)
360 0 1 unless (index($res->content, $args{'content_substr'}) >= 0)
370 1 0 unless $whitelist
372 0 0 unless tie my %white, 'SDBM_File', $whitelist, 66, 438
380 1 0 unless $$args{'nmap'}
383 0 0 $count{$_}++ ? :
386 0 0 if not $nmap_result or $?
389 0 0 if ($state eq 'open') { }
0 0 elsif (grep(($_ eq $port), @{$$args{'primary'};})) { }
407 0 0 unless $$args{'log'}
409 0 0 unless open my $log, '+>>', $$args{'log'}
411 0 0 lc substr($ENV{'REQUEST_URI'}, 0, 4) eq 'http' ? :
415 0 0 unless substr($host, 3) eq $ip
419 0 0 unless -s $log > $$args{'log_maxbytes'}