On Thu, 17 Mar 2011 07:43:55 +1100, Nick Wellnhofer <[email protected]>
wrote:
On 16/03/11 14:44, Cosimo Streppone via RT wrote:
Bug still present for me in:
This is Rakudo Perl 6, version 2011.02-55-ge3bd9aa built on parrot
3.2.0 RELEASE_3_2_0
I tried having a look at the source code, starting from the error
message ("Can't connect closed socket"), and it seems to me that:
* the FileHandle PMC os_handle attribute is set to PIO_INVALID_HANDLE
at initialization time
* when trying to open the socket with Parrot_io_connect_handle(),
Parrot_io_is_closed_handle() is called, which compares the os_handle
attribute with PIO_INVALID_HANDLE
* a match is found, so the handle is assumed to be closed, and this
stops any attempt to connect.
That's because the 'socket' method of the Socket PMC has to be called
first. The open method in IO::Socket::INET doesn't do that, so it should
be fixed there.
Thanks Nick.
FTR, the solution at least at rakudo level is:
https://github.com/cosimo/perl6-lwp-simple/commit/28161ebac8799a2dab22537c5f6dc39d35f54ef2
didn't know about it, thanks Moritz.
--
Cosimo
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev