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