Branch Coverage

blib/lib/App/HTTP_Proxy_IMP/Relay.pm
Criterion Covered Total %
branch 0 188 0.0


line true false branch
31 0 0 if ($upstream and not ref $upstream)
32 0 0 unless $upstream =~ /\A(?:\[([a-f\d:.]+)\]|([\da-z_\-.]+)):(\d+)\Z/
60 0 0 if ($exit_if_no_relays and not $self->relays)
74 0 0 $acct ? :
0 0 if %args
75 0 0 unless $acct
77 0 0 if (my $t = delete $acct->{'start'})
84 0 0 if (not defined $v) { }
0 0 elsif (ref $v eq 'ARRAY') { }
0 0 elsif (defined $v) { }
99 0 0 $text =~ / / ? :
105 0 0 if (my $xdebug = UNIVERSAL::can($conn, 'xdebug')) { }
138 0 0 unless (my $fd = $self->{'fds'}[$dir])
153 0 0 unless my $fo = $self->{'fds'}[$to]
163 0 0 unless my $conn = $self->{'conn'}
164 0 0 unless my $mitm = $conn->{'mitm'}
170 0 0 unless my $sfo = $self->{'fds'}[$from]
186 0 0 -d $conn->{'capath'} ? :
0 0 $conn->{'capath'} ? :
193 0 0 unless my $cfo = $wself->{'fds'}[$to]
203 0 0 if $callback
214 0 0 unless not $_
222 0 0 unless my $fo = $self->{'fds'}[$dir]
233 0 0 unless $fo and $fo->{'fd'}
234 0 0 if $fo->{'rbuf'} ne ''
235 0 0 if $fo->{'wbuf'} ne ''
236 0 0 unless $fo->{'status'} & 4
237 0 0 unless $fo->{'status'} & 2
240 0 0 if ($sink eq '')
241 0 0 if $App::HTTP_Proxy_IMP::Relay::DEBUG
246 0 0 if ($drain ne '01')
248 0 0 unless ($conn and $conn->open_requests)
250 0 0 if $App::HTTP_Proxy_IMP::Relay::DEBUG
255 0 0 if $App::HTTP_Proxy_IMP::Relay::DEBUG
265 0 0 if (my $fds = $self->{'fds'})
273 0 0 if defined wantarray
337 0 0 $connected ? :
347 0 0 if (my $xdebug = UNIVERSAL::can($conn, 'xdebug')) { }
359 0 0 if ($self->{'fd'})
370 0 0 if $self->{'fd'}
386 0 0 $rw eq 'w' ? :
0 0 $rw eq 'r' ? :
387 0 0 $write ? :
388 0 0 if $self->{'status'} & $stat and not $force
391 0 0 if ($write and $self->{'wbuf'} ne '')
394 0 0 unless $force
403 0 0 if (($self->{'status'} & 6) == 6) { }
0 0 elsif ($write) { }
422 0 0 if ($rw eq 'r') { }
0 0 elsif ($rw eq 'w') { }
423 0 0 if (not $val) { }
427 0 0 if $self->{'status'} & 4
433 0 0 ref $val ? :
436 0 0 if (not $val) { }
440 0 0 if $self->{'status'} & 2
446 0 0 ref $val ? :
458 0 0 if ($self->{'wbuf'} eq '') { }
467 0 0 if ($self->{'wbuf'} ne '' and not $self->{'wsrc'}{$from}++)
482 0 0 unless (defined $n)
484 0 0 unless $!{'EINTR'} or $!{'EAGAIN'}
491 0 0 if ($self->{'wbuf'} eq '') { }
496 0 0 if ($self->{'status'} & 4)
503 0 0 if (my $src = $self->{'wsrc'})
522 0 0 unless (defined $n)
523 0 0 unless ($!{'EINTR'} or $!{'EAGAIN'})
527 0 0 if $self->{'relay'}{'conn'}->open_requests
541 0 0 unless defined $self->{'fd'}
543 0 0 if ($bytes)
550 0 0 if not $n and $self->{'rbuf'} ne ''
552 0 0 if not $n
560 0 0 if $self->{'fd'} and $reconnect || ($self->{'host'} || '' ne "$host.$port")
563 0 0 if ($self->{'status'} & 1)
572 0 0 unless $self->{'relay'}
573 0 0 if (my $addr = shift()) { }
575 0 0 if (my $fd = shift()) { }
576 0 0 unless $self->{'relay'}
585 0 0 unless $self->{'relay'}
600 0 0 unless $self->{'rbuf'} eq ''
602 0 0 unless $self->{'wbuf'} eq ''
604 0 0 @_ % 2 ? :
607 0 0 unless 'IO::Socket::SSL'->start_SSL($self->{'fd'}, %sslargs, 'SSL_startHandshake', 0)
611 0 0 $sslargs{'SSL_server'} ? :
618 0 0 if (&$sub($self->{'fd'})) { }
0 0 elsif ($!{'EAGAIN'}) { }
0 0 elsif ($sslargs->{'SSL_server'}) { }
620 0 0 if $cb
626 0 0 $App::HTTP_Proxy_IMP::Relay::FD::SSL_ERROR == 63739776 ? :
0 0 $App::HTTP_Proxy_IMP::Relay::FD::SSL_ERROR == 63739704 ? :
648 0 0 unless my $e = $cache{lc $host}
650 0 0 if not @$e
657 0 0 if (my $e = $cache{$host}) { }
0 0 elsif (inet_pton(2, $host) or inet_pton(10, $host)) { }
664 0 0 if (@_)
671 0 0 if @_