Subject: | Cannot get timeout error message from Net::Cmd |
Hi,
I use Net::SMTP for monitoring e-mail servers. Sometimes,
when their load is high, these servers need unusually long for
accepting messages, so I get a timeout in Net::Cmd::getline():
269 if (select($rout=$rin, undef, undef, $timeout))
The problem I have is, that this timeout is not propagated
to the calling code, unless when running in debug mode:
288 else
289 {
290 carp("$cmd: Timeout") if($cmd->debug);
291 print STDERR "FANY: $!\n";
292 return undef;
293 }
294 }
(But if I use debug mode, I'll get lots of other annoying
messages, will have to set up an ugly $SIG{__WARN__} handler
to filter them etc.)
Since select() does not treat the timeout as an error
(so $! is empty), I have no (good) idea on how to figure
out that I've got a timeout (and not any other problem).
I consider this a bug and suggest to modify line 290 to
an unconditional
carp "$cmd: Timeout";
Regards,
fany