Cannot get timeout error message from Net::Cmd

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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 the method just returns undef in
this case, unless when running in debug mode:

     288    else
     289     {
     290      carp("$cmd: Timeout") if($cmd->debug);
     291      return undef;
     292     }
     293   }

But if I use debug mode, I'll get lots of other annoying
messages, will have to set up an ugly $SIG handler
to filter them etc.

Does anybody have a good idea on how to figure out that the
undef I get stems from a timeout?


Site Timeline