Branch Coverage

blib/lib/NetServer/Generic.pm
Criterion Covered Total %
branch 61 218 27.9


line true false branch
20 14 0 if (not eval 'require Thread') { }
585 0 28 if $NetServer::Debug
586 28 0 if @_
596 0 28 if (@_)
633 2 0 if ($self->hostname ne '')
637 0 2 unless ($main_sock)
642 0 2 if $NetServer::Debug
658 0 3 unless defined $pid
659 2 1 if ($pid == 0) { }
662 0 0 if $NetServer::Debug
667 0 1 if $NetServer::Debug
697 0 0 if $NetServer::Debug
704 0 0 if $NetServer::Debug
707 0 0 if $NetServer::Debug
711 0 0 if $NetServer::Debug
716 0 0 if ($status eq 'exit') { }
0 0 elsif ($status eq 'busy') { }
0 0 elsif ($status eq 'idle') { }
0 0 elsif ($status eq 'start') { }
718 0 0 if $NetServer::Debug
733 0 0 if $NetServer::Debug
737 0 0 if $NetServer::Debug
740 0 0 if ($all_kids - $busycnt < $spare_servers and $all_kids <= $max_servers)
743 0 0 if $NetServer::Debug
753 0 0 if ($pid == 0) { }
755 0 0 if $NetServer::Debug
761 0 0 if $NetServer::Debug
768 0 0 if $NetServer::Debug
792 0 2 if $NetServer::Debug
794 0 2 if $NetServer::Debug
797 0 2 if $NetServer::Debug
801 0 8 if (scalar @err > 0)
803 0 0 if ($NetServer::Debug > 0)
806 0 0 if ($s->eof) { }
816 0 8 if $NetServer::Debug
818 0 9 if $NetServer::Debug
819 5 4 if ($sock == $main_sock) { }
820 0 5 unless (flock $sock, $LOCK_EX)
828 0 5 unless ($self->ok_to_serve($new_sock))
833 4 0 if (not eof $sock) { }
835 0 4 if $NetServer::Debug
838 0 4 if $NetServer::Debug
854 0 3 if ($NetServer::Debug)
867 0 7 if $NetServer::Debug
869 1 6 if ($my_age >= $server_lifespan)
870 0 1 if $NetServer::Debug
879 0 0 if $NetServer::Debug
896 0 0 unless ($main_sock)
900 0 0 if $NetServer::Debug
902 0 0 if $NetServer::Debug
905 0 0 if $NetServer::Debug
911 0 0 if ($sock == $main_sock) { }
915 0 0 unless ($self->ok_to_serve($new_sock))
920 0 0 if (not eof $sock) { }
946 0 0 if ($MAIN::no_thread == 1)
956 0 0 if ($self->hostname ne '')
961 0 0 unless $main_sock
965 0 0 unless (exists $SIG{'INT'})
976 0 0 if $NetServer::Debug
978 0 0 if $NetServer::Debug
981 0 0 if $NetServer::Debug
986 0 0 if ($sock == $main_sock) { }
990 0 0 unless ($self->ok_to_serve($new_sock))
995 0 0 if (not eof $sock) { }
1024 0 0 if ($self->ok_to_serve($sock))
1046 1 0 if ($self->hostname ne '')
1051 0 1 unless $main_sock
1056 0 1 unless (exists $SIG{'INT'})
1071 0 1 if defined $ante_fork_callback
1074 0 1 unless defined $pid
1075 1 0 if ($pid == 0) { }
1077 0 1 if ($NetServer::Debug != 0)
1082 1 0 if ($self->ok_to_serve($new_sock)) { }
1083 0 1 if $NetServer::Debug
1095 0 0 if ($NetServer::Debug)
1100 0 0 if $NetServer::Debug
1102 0 0 if $NetServer::Debug
1109 0 0 if $NetServer::Debug
1110 0 0 if (defined $parent_callback)
1128 0 0 $NetServer::Generic::default_trigger > 1 ? :
1137 0 34 unless defined $pid
1138 9 25 if ($pid == 0) { }
1140 0 9 if ($NetServer::Debug != 0)
1153 3 6 unless $sock
1163 0 25 if $NetServer::Debug
1173 0 14 if $NetServer::Debug
1174 1 13 if (not defined $self->mode or lc $self->mode eq 'forking') { }
0 13 elsif (lc $self->mode eq 'select') { }
0 13 elsif (lc $self->mode eq 'select_fast') { }
11 2 elsif (lc $self->mode eq 'client') { }
0 2 elsif (lc $self->mode eq 'threaded') { }
2 0 elsif (lc $self->mode eq 'prefork') { }
1203 0 6 if $NetServer::Debug
1204 6 0 unless defined $self->forbidden or defined $self->allowed
1211 0 0 if (defined $self->allowed)
1214 0 0 unless defined $_
1215 0 0 if ($peername =~ /^$_$/i or $peeraddr =~ /^$_$/i)
1217 0 0 if $NetServer::Debug
1223 0 0 if (defined $self->forbidden)
1226 0 0 unless defined $_
1227 0 0 if ($peername =~ /^$_$/i or $peeraddr =~ /^$_$/i)
1229 0 0 if $NetServer::Debug
1236 0 0 if $found_banned and not $found_allowed
1237 0 0 if $found_allowed and not $found_banned
1238 0 0 if $found_allowed and $found_banned
1282 0 2 if $NetServer::Debug
1292 108 170 if (@_) { }
1296 0 108 unless (exists $self->{'tags'}{$name})
1300 0 108 unless ($r =~ /$self->{'tags'}{$name}/i)