The status line should contain timeout details. Mine looked like this after a test run:
500 Can't connect to mypoorcomputer.org (connect: timeout)
# ... $ua->timeout(10); my $response = $ua->request($r); if ($response->is_success) { print "whee.\n"; } elsif ($response->status_line =~ /timeout/) { die "Timed out\n"; } else { die $response->status_line; }
In reply to Re: detecting timeout in LWP
by webfiend
in thread detecting timeout in LWP
by vkhera
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |