Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: detecting timeout in LWP

by webfiend (Vicar)
on Jul 30, 2007 at 22:34 UTC ( #629681=note: print w/replies, xml ) Need Help??


in reply to detecting timeout in LWP

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; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629681]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2019-07-20 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?