Skip Menu |

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 46580
Status: rejected
Priority: 0/
Queue: IO

People
Owner: Nobody in particular
Requestors: setitesuk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.25
Fixed in: (no value)



Subject: True value returned always on print to a socket
Hi, I am using IO-1.25 and Net::Stomp 0.34 (which actually uses IO::Socket::INET) to send messages to a message queue. I have hit a problem, in which that in Net::Stomp::send_frame, the message is 'print'ed to the socket, but that the return value is always true, even if the message_queue has gone away between making the socket connection and going to send the message. Is it possible that this could be fixed to throw an error (or at least return false) if the message can't be printed to the socket filehandle. I don't know if this is really an error with the print function in perl, but this is causing an issue with trying to operate a robust system, which would alert if it is unable to send the message to queue. Thanks for reading, and any help/fix that could be done. Cheers Andy
This is not an issue in IO. For ->print IO is nothing more than a thin veneer over perls print function. So you would get identical result with print $socket @args; If there is a bug, then it is in perl itself.
Subject: Re: [rt.cpan.org #46580] True value returned always on print to a socket
Date: Mon, 1 Jun 2009 16:35:13 +0100
To: bug-IO [...] rt.cpan.org
From: Andy Brown <setitesuk [...] gmail.com>
Hi Graham, Thanks for your speedy response. I did wonder if this might be the case, but didn't know if it was something that would be from IO, since the print is to the $socket 'filehandle'. Anyway, I am now working around it by testing the socket has a valid connection just before the print, so hopefully, errors will be minimised. Cheers Andy On 1 Jun 2009, at 15:44, Graham_Barr via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=46580 > > > This is not an issue in IO. For ->print IO is nothing more than a > thin veneer over perls print function. So you would get identical > result with print $socket @args; > > If there is a bug, then it is in perl itself.
-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.