Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: stopping www::mechanize from exiting after a timeout

by Anonymous Monk
on Aug 14, 2009 at 07:29 UTC ( [id://788551]=note: print w/replies, xml ) Need Help??


in reply to stopping www::mechanize from exiting after a timeout

You can catch die's with eval {}, example
#!/usr/bin/perl -- use strict; use warnings; use WWW::Mechanize; my $ua = WWW::Mechanize->new( autocheck => 1 ); for ( 1, 6 ){ eval { $ua->get('die://die'); 1 } or print "$@\n"; } __END__ Error GETing die://die: Protocol scheme 'die' is not supported at - li +ne 9 Error GETing die://die: Protocol scheme 'die' is not supported at - li +ne 9
Or turn autocheck off, and do your own checking.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2025-11-08 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (65 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.