micronx2 has asked for the wisdom of the Perl Monks concerning the following question:

I can't figure out how to change the tcp_timeout here is the text from the Email:Valid docs:

If Net::DNS is available, you can modify the behavior of the resolver (e.g. change the default tcp_timeout value) by manipulating the global Net::DNS::Resolver instance stored in $Email::Valid::Resolver.

Any help would be appreciated!

Thanks,
Steve

Replies are listed 'Best First'.
Re: Email::Valid tcp_timeout
by doowah2004 (Monk) on Aug 28, 2004 at 05:54 UTC
    Im not real familiar with this, but you can try:

    $res = new Net::DNS::Resolver;
    $res->tcp_timeout($s);

    where $s is in seconds, ie. 60 = 1 minute.


    Hope this helps.
Re: Email::Valid tcp_timeout
by Aristotle (Chancellor) on Aug 29, 2004 at 23:14 UTC

    That implies that you can do

    $Email::Valid::Resolver->tcp_timeout( 10 ); # seconds

    Makeshifts last the longest.