TcpServer: assign default value during declaration

This commit is contained in:
Matt Simerson 2012-06-23 23:04:50 -04:00
parent 64b59d73c4
commit 6654ff0150

View File

@ -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;