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

When using the LWP UserAgent and Simple methods to retrieve a URI, if the URI does not exist, the program freezes. I have tried timeouts and other assorted error checking code, but cannot seem to get the code to function properly. If there a patch for LWP that I could download, or is there another way around this problem?

Replies are listed 'Best First'.
Re: LWP URI Call Freezes
by meonkeys (Chaplain) on Jun 27, 2001 at 06:30 UTC
    Could you post a code snippet?

    I'm pretty sure the timeout is 180 seconds (3 minutes). Are you waiting this long for the content to be retrieved? I don't think there's a way to change the LWP::UserAgent timeout whilst using LWP::Simple unless you cheat (access private attributes).