in reply to Re^2: WWW::Mechanize follow_link() crashes if no link is found
in thread WWW::Mechanize follow_link() crashes if no link is found
Is there any way to make my program move on with the next step
If all else fails, you could trap the exception, i.e. wrap the call within eval { ... } — Something like this
my $foo; # undefined eval { $foo->url(); # would 'Can't call method "url" on an undefined val +ue ...' }; if ($@) { # ... handle the exception print "error: ...: $@\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: WWW::Mechanize follow_link() crashes if no link is found
by venkatesan_G02 (Sexton) on Sep 25, 2009 at 12:29 UTC |