Branch Coverage

blib/lib/Net/DNAT.pm
Criterion Covered Total %
branch 0 90 0.0


line true false branch
45 0 0 if ($string =~ s/:(\d+)//) { }
0 0 elsif ($string =~ s/:(\w+)//) { }
50 0 0 if (not $string =~ /^\d+\.\d+\.\d+\.\d+$/) { }
53 0 0 unless @result
70 0 0 unless (ref $old_pools_ref and ref $old_pools_ref eq 'HASH')
80 0 0 if (not ref $dest) { }
0 0 elsif (ref $dest eq 'ARRAY') { }
97 0 0 if ($new_host =~ s/^([a-z0-9\-\.]*[a-z])\.?$/\L$1\E/i) { }
109 0 0 unless ($self->{'pools'}{$self->{'switch_filters'}[$i]})
115 0 0 unless (defined $self->{'default_pool'})
116 0 0 if (scalar keys %{$$self{'pools'};} == 1) { }
123 0 0 unless ($self->{'pools'}{$self->{'default_pool'}})
131 0 0 defined $conf_hash->{'connect_timeout'} ? :
133 0 0 if (exists $conf_hash->{'check_for_dequeue'}) { }
134 0 0 if (defined $conf_hash->{'check_for_dequeue'} and $conf_hash->{'check_for_dequeue'} > 0)
143 0 0 if $self->{'server'}{'check_for_dequeue'}
158 0 0 $self->{'pools'}{$pool} ? :
162 0 0 unless $host and $port
165 0 0 if (exists $$ping_cache{"${host}:$port"}) { }
172 0 0 unless ($alive)
176 0 0 unless $alive
177 0 0 unless ($new_pools->{$pool})
209 0 0 unless (defined $fh and defined fileno $fh)
215 0 0 if ($self->{'state'} eq 'REQUEST')
219 0 0 if ($$data =~ s/^([^\r\n]*)\r?\n//)
222 0 0 if ($request =~ m[ (\w+)\s+ # method (/.*)\s+ # path HTTP/(1\.[01]) # protocol $]xi) { }
239 0 0 if ($self->{'state'} eq 'HEADERS' and $$data)
242 0 0 if ($$data =~ s/^((.*\n)*)\r?\n//)
271 0 0 if (my $how = ref $ref) { }
272 0 0 if ($how eq 'CODE') { }
0 0 elsif ($how eq 'Regexp') { }
273 0 0 if (&$ref())
278 0 0 if ($_ =~ /$ref/)
291 0 0 if (not defined $pool and /^Host: ([\w\-\.]+)/m)
295 0 0 if ($request_host eq $host)
304 0 0 unless (defined $pool)
310 0 0 unless ($pool_ref)
320 0 0 if (++$pool_ref->[0] > $#{$pool_ref;})
333 0 0 unless 'IO::Socket::INET'->new($peeraddr)
336 0 0 if $@
337 0 0 if ($peersock) { }
357 0 0 if $self->{'net_server'}{'server'}{'check_for_dequeue'}
362 0 0 if ($self->{'state'} eq 'CONTENT' and $$data)
364 0 0 if ($self->{'complement_object'} and $self->{'complement_object'}{'fh'} and defined fileno $self->{'complement_object'}{'fh'}) { }
390 0 0 if ($self->{'complement_object'})