TcpServer: assign default value during declaration
This commit is contained in:
parent
64b59d73c4
commit
6654ff0150
@ -8,7 +8,7 @@ use strict;
|
||||
|
||||
use POSIX ();
|
||||
|
||||
my $has_ipv6;
|
||||
my $has_ipv6 = 0;
|
||||
if (
|
||||
eval {require Socket6;} &&
|
||||
# INET6 prior to 2.01 will not work; sorry.
|
||||
@ -17,9 +17,6 @@ if (
|
||||
import Socket6;
|
||||
$has_ipv6=1;
|
||||
}
|
||||
else {
|
||||
$has_ipv6=0;
|
||||
}
|
||||
|
||||
sub has_ipv6 {
|
||||
return $has_ipv6;
|
||||
|
Loading…
Reference in New Issue
Block a user