Gangabass has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
i need a way to check if request result was bad (i mean no connection etc.). At this time i check each request with eval:
GET_START: eval { $mech->get( $CONFIG{BASE_URL} ); }; if ($@) { sleep $CONFIG{DELAY}; goto GET_START; }
But this is so ugly. I'm sure i need to subclass WWW::Mechanize but don't know how. Also i need to check for errors on each request (submit_form, get, follow_link etc.). How i can do this?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: WWW::Mechanize and connection errors
by Limbic~Region (Chancellor) on Oct 12, 2009 at 17:22 UTC | |
Re: WWW::Mechanize and connection errors
by saberworks (Curate) on Oct 12, 2009 at 16:50 UTC | |
Re: WWW::Mechanize and connection errors
by almut (Canon) on Oct 12, 2009 at 19:33 UTC | |
Re: WWW::Mechanize and connection errors
by Anonymous Monk on Oct 17, 2009 at 20:17 UTC |
Back to
Seekers of Perl Wisdom