This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix precedence problem in IO::Socket::connect() from 80d2c56d79
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 18 Sep 2013 10:09:21 +0000 (11:09 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 18 Sep 2013 10:09:21 +0000 (11:09 +0100)
Thanks to Andreas Koenig for the spot.

dist/IO/lib/IO/Socket.pm

index 9138a61..d41f80b 100644 (file)
@@ -136,7 +136,7 @@ sub connect {
            }
            elsif (!connect($sock,$addr) &&
                 not ($!{EISCONN} || ($^O eq 'MSWin32' &&
            }
            elsif (!connect($sock,$addr) &&
                 not ($!{EISCONN} || ($^O eq 'MSWin32' &&
-                $! == ($] < 5.019004) ? 10022 : Errno::EINVAL))
+                ($! == ($] < 5.019004) ? 10022 : Errno::EINVAL)))
             ) {
                # Some systems refuse to re-connect() to
                # an already open socket and set errno to EISCONN.
             ) {
                # Some systems refuse to re-connect() to
                # an already open socket and set errno to EISCONN.