Subject: | Handle.pm, make_socket fails on old perl version |
As the variable $^V was introduced in perl 5.6.0 and you need to call
the _glob_ref function in version prior to 5.6.0 you need to reverse
the test for the $^V variable (or use the $^] variable instead).
I assume that setting $socket to undef for perl 5.6.0 or later is
correct. It was set to undef for perl version 5.005 and earlier.
Change tested on version 5.005_03 built for i386-linux.
--- Net-SSLeay-Handle-0.50/Handle.pm.orig Sun Aug 17 09:12:59 2003
+++ Net-SSLeay-Handle-0.50/Handle.pm Wed Oct 1 11:01:23 2003
@@ -162,7 +162,7 @@
my $dest_ip = gethostbyname( $phost || $host);
my $host_params = sockaddr_in($pport, $dest_ip);
- my $socket = $^V ? $class->_glob_ref("$host:$port") : undef;
+ my $socket = defined $^V ? undef : $class->_glob_ref("$host:$port");
socket($socket, &PF_INET(), &SOCK_STREAM(), 0) or die "socket: $!";
connect($socket, $host_params) or die "connect: $!";
Villy