NI_DGRAM isn't needed because it's a TCP, not UDP socket and we don't care
about the service name
NIx_NOSERV is a xflag and has to be specified as the third parameter
package Catalyst::Request;
-use Socket qw( getaddrinfo getnameinfo AI_NUMERICHOST NI_DGRAM NIx_NOSERV );
+use Socket qw( getaddrinfo getnameinfo AI_NUMERICHOST NIx_NOSERV );
use Carp;
use utf8;
use URI::http;
}
( $err, my $hostname ) = getnameinfo(
$sockaddr->{addr},
+ 0,
# we are only interested in the hostname, not the servicename
- NI_DGRAM|NIx_NOSERV
+ NIx_NOSERV
);
if ( $err ) {
$self->_log->warn("resolve of hostname failed: $err");