Commits

Shlomi Fish committed 0e92ae1

Solve symbol clashes.

  • Participants
  • Parent commits b6da858

Comments (0)

Files changed (3)

File modules/IO-Socket-INET6/ChangeLog

+	* Solved symbol clashes in t/io_multihomed6.t .
+		- Fixes https://rt.cpan.org/Ticket/Display.html?id=72769
+
 2011-01-21 Shlomi Fish <shlomif@iglu.org.il>
 	* IO-Socket is doing some imports so we now do use IO::Socket ().
 		- Fixed the rest of the imports.

File modules/IO-Socket-INET6/MANIFEST

 t/listen_port_only.t
 t/pod-coverage.t
 t/pod.t
+META.json

File modules/IO-Socket-INET6/t/io_multihomed6.t

 
 # check that localhost resolves to 127.0.0.1 and ::1
 # otherwise the test will not work
-use Socket;
-use Socket6;
+
+use Socket (qw(
+    AF_INET6 PF_INET6 SOCK_RAW SOCK_STREAM INADDR_ANY SOCK_DGRAM
+    AF_INET SO_REUSEADDR SO_REUSEPORT AF_UNSPEC SO_BROADCAST
+    sockaddr_in unpack_sockaddr_in
+    )
+);
+
+# IO::Socket and Socket already import stuff here - possibly AF_INET6
+# and PF_INET6 so selectively import things from Socket6.
+use Socket6 (
+    qw(AI_PASSIVE getaddrinfo
+    sockaddr_in6 unpack_sockaddr_in6_all pack_sockaddr_in6_all in6addr_any
+    inet_ntop
+    )
+);
 
 {
     my %resolved_addresses;
     }
 }
 
-use IO::Socket::INET6;
+# IO::Socket has an import method that is inherited by IO::Socket::INET6 ,
+# and so we should instruct it not to import anything.
+use IO::Socket::INET6 ();
 
 $| = 1;
 print "1..8\n";