dchau has asked for the wisdom of the Perl Monks concerning the following question:
I want to do something when the request times out. Sort of like:foreach (@url){ chomp; $site = "$_"; $time = time(); $ua->timeout(30); $request = new HTTP::Request POST => $site; $response = $ua->request($request); $return_code = $response->code([$code]); &check_status($site, $return_code, $time); }
is this possible? with the timeout function? Thanks in advance.if ($ua->timeout(30)){ Write to log }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP timeout
by Jouke (Curate) on Apr 02, 2001 at 17:57 UTC | |
by arhuman (Vicar) on Apr 02, 2001 at 18:17 UTC | |
|
Re: LWP timeout
by THRAK (Monk) on Apr 02, 2001 at 18:02 UTC | |
|
Re: LWP timeout
by dchau (Novice) on Apr 02, 2001 at 18:49 UTC |