Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: www::mechanize - how to prevent it dying?

by Corion (Patriarch)
on Oct 06, 2010 at 08:03 UTC ( [id://863733]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $mech = WWW::Mechanize->new( autocheck => 0 );
    my $res = $mech->get('does.notexist.example');
    $res->is_success
        or print "Uhoh\n";
    
  2. or download this
    my $mech = WWW::Mechanize->new();
    my $connected = eval {
    ...
    if (! $connected) {
        print "Uhoh\n";
    };
    
  3. or download this
    use Try::Tiny;
    
    ...
        print "Uhoh: $_\n";
    };
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found