Subject: | POE::Wheel::SocketFactory: Broken Link, Typo's, and missing prototypes |
Here's a POE::Wheel::SocketFactory patch which does 3 things:
o Replaces the broken link to a MS Knowledgebook article
o Adds prototypes to eval'd socket constants so they can be inlined
o fixes a typo
--- SocketFactory.pm Sun Oct 20 16:35:52 2002
+++ SocketFactory.cgg Tue Nov 05 15:19:01 2002
@@ -38,20 +38,21 @@
# know you've broken his module.
# Provide dummy POSIX constants for systems that don't have them. Use
-# http://support.microsoft.com/support/kb/articles/Q150/5/37.asp for
+# http://msdn.microsoft.com/library/en-us/winsock/winsock/
+ windows_sockets_error_codes_2.asp
# the POSIX error numbers.
BEGIN {
if ($^O eq 'MSWin32') {
- eval '*EADDRNOTAVAIL = sub { 10049 };';
- eval '*EINPROGRESS = sub { 10036 };';
- eval '*EWOULDBLOCK = sub { 10035 };';
- eval '*F_GETFL = sub { 0 };';
- eval '*F_SETFL = sub { 0 };';
+ eval '*EADDRNOTAVAIL = sub () { 10049 };';
+ eval '*EINPROGRESS = sub () { 10036 };';
+ eval '*EWOULDBLOCK = sub () { 10035 };';
+ eval '*F_GETFL = sub () { 0 };';
+ eval '*F_SETFL = sub () { 0 };';
}
unless (exists $INC{"Socket6.pm"}) {
- eval "*Socket6::AF_INET6 = sub { ~0 }";
- eval "*Socket6::PF_INET6 = sub { ~0 }";
+ eval "*Socket6::AF_INET6 = sub () { ~0 }";
+ eval "*Socket6::PF_INET6 = sub () { ~0 }";
}
}
@@ -394,7 +395,7 @@
my %params = @_;
- # The calling conventio experienced a hard deprecation.
+ # The calling convention experienced a hard deprecation.
croak "wheels no longer require a kernel reference as their first parameter"
if (@_ && (ref($_[0]) eq 'POE::Kernel'));