TcpServer: assign default value during declaration
This commit is contained in:
parent
e4d50a27d9
commit
96dd90f808
@ -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