Subject: | talk-to-ourself fails on OpenVMS (fix provided) |
Hello,
I really like LWP and appreciate the work to do with the module a lot.
Here is a small problem I found in the following environment
libwww-perl 5.837
Perl 5.12.2
OpenVMS 8.3-1H1
The talk-to-ourself script fails on OpenVMS since there is too much
quoting applied, i.e. the following line
open(CLIENT, qq("$^X" "$0" --port $port |)) || die "Can't run $^X $0: $!\n";
applies quoting twice (once via qq and once with explicit "" quote
marks) to the perl executable. This does not work with the shell (DCL)
on OpenVMS and causes the open to fail. Removing the explicit quote
marks (as in the attached patch) fixes the problem. I cross tested on my
Linux system (openSUSE 11.3) and the changed script worked fine there too.
If you know of other plattforms that actually require the double quoting
I can write a patch that will change this conditionally.
I'd be happy if you would consider this for inlusion in the next release.
Greetings, Martin
Subject: | talk-to-ourself.patch |
*** talk-to-ourself 2011-02-11 11:47:47.659649886 -0600
--- talk-to-ourself.orig 2011-02-11 11:47:32.268622440 -0600
***************
*** 34,40 ****
# server code
my $socket = IO::Socket::INET->new(Listen => 1, Timeout => 5);
my $port = $socket->sockport;
! open(CLIENT, qq($^X "$0" --port $port |)) || die "Can't run $^X $0: $!\n";
if (my $client = $socket->accept) {
print $client "Hi there!\n";
--- 34,40 ----
# server code
my $socket = IO::Socket::INET->new(Listen => 1, Timeout => 5);
my $port = $socket->sockport;
! open(CLIENT, qq("$^X" "$0" --port $port |)) || die "Can't run $^X $0: $!\n";
if (my $client = $socket->accept) {
print $client "Hi there!\n";