Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix usage of Socket::GetAddrInfo for new version 0.22.

avenj on irc.perl.org #poe pointed out that Socket::GetAddrInfo 0.22
changed public behavior and began throwing the following error.  This
change compensates for that and requires version 0.22 or later.

:newapi tag is no longer supported by Socket::GetAddrInfo; just 'use'
it directly
  • Loading branch information...
commit 4a415e5228e7c41da67027e7821ad606a418363f 1 parent 202dea1
Rocco Caputo authored
2  dist.ini
@@ -6,7 +6,7 @@ copyright_holder = Rocco Caputo
6 6 [Prereqs]
7 7 POE = 1.311
8 8 Scalar::Util = 1.23
9   -Socket::GetAddrInfo = 0.19
  9 +Socket::GetAddrInfo = 0.22
10 10 Storable = 2.18
11 11 Test::More = 0.96
12 12 Time::HiRes = 1.9711
2  lib/POE/Component/Resolver.pm
@@ -7,7 +7,7 @@ use POE qw(Wheel::Run Filter::Reference);
7 7 use Carp qw(croak carp);
8 8 use Time::HiRes qw(time);
9 9 use Socket qw(unpack_sockaddr_in AF_INET AF_INET6);
10   -use Socket::GetAddrInfo qw(:newapi getnameinfo NI_NUMERICHOST NI_NUMERICSERV);
  10 +use Socket::GetAddrInfo qw(getnameinfo NI_NUMERICHOST NI_NUMERICSERV);
11 11
12 12 use POE::Component::Resolver::Sidecar;
13 13
2  lib/POE/Component/Resolver/Sidecar.pm
@@ -5,7 +5,7 @@ use strict;
5 5
6 6 use Storable qw(nfreeze thaw);
7 7
8   -use Socket::GetAddrInfo qw(:newapi getaddrinfo);
  8 +use Socket::GetAddrInfo qw(getaddrinfo);
9 9
10 10 sub main {
11 11 my $buffer = "";
2  t/01-basic.t
@@ -17,7 +17,7 @@ my $r4 = POE::Component::Resolver->new(
17 17
18 18 # Try to detect whether we can resolve IPv6 addresses at all.
19 19
20   -use Socket::GetAddrInfo qw(:newapi getaddrinfo);
  20 +use Socket::GetAddrInfo qw(getaddrinfo);
21 21 my $has_ipv6 = do {
22 22 my ($error, @addresses) = getaddrinfo(
23 23 "ipv6.test-ipv6.com", "www", { family => AF_INET6 }

0 comments on commit 4a415e5

Please sign in to comment.
Something went wrong with that request. Please try again.