|$timing_string = $browser->timing();|
|$browser->timing( 10,30,90 )||
The timing method gets or sets the string that controls how many
times it should retry, and how long the pauses should be.
If you specify empty-string, this means not to retry at all.
If you specify a string consisting of a single number, like 10, that means that if the first request doesnt succeed, then $browser->get(...) (or any other method based on request or simple_request) should wait 10 seconds and try again (and if that fails, then its final).
If you specify a string with several numbers in it (like 10,30,90), then that means $browser can retry as that many times (i.e., one initial try, plus a maximum of the three retries, because three numbers there), and that it should wait first those numbers of seconds each time. So $browser->timing( "10,30,90" ) basically means:
The default value is 1,3,15.
|$http_codes_hr = $browser->codes_to_determinate();||
This returns the hash that is the set of HTTP codes that merit a retry
(like 500 and 408, but unlike 404 or 200). You can delete or add
entries like so;
(You can actually set a whole new hashset with $browser->codes_to_determinate($new_hr), but theres usually no benefit to that as opposed to the above.)
The current default is 408 (Timeout) plus some 5xx codes.
|$browser->before_determined_callback( \&some_routine );|
|$browser->after_determined_callback( \&some_routine );||
These read (first two) or set (second two) callbacks that are
called before the actual HTTP/FTP/etc request is made. By default,
these are set to undef, meaning nothing special is called. If you
want to alter try requests, or inspect responses before any retrying
is considered, you can set up these callbacks.
The arguments passed to these routines are:
This class works by overriding LWP::UserAgents simple_request method with its own around-method that just loops. See the source of this module; its straightforward. Relatively.
Copyright 2004, Sean M. Burke, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
Originally created by Sean M. Burke, email@example.com
Currently maintained by Jesse Vincent firstname.lastname@example.org
|perl v5.20.3||LWP::USERAGENT::DETERMINED (3)||2014-06-24|