NAME
WWW::Mechanize::Plugin::Retry - programatically-controlled fetch retry
VERSION
Version 0.01
SYNOPSIS
use WWW::Mechanize::Pluggable;
my $foo = WWW::Mechanize::Plugin::Retry->new();
my $foo->retry_if(\&test_sub, 5, 10, 30, 60);
# Will run test_sub with the Mech object after the get.
# If the test_sub returns true, shift off one wait interval
# from the list, wait that long, and repeat. Give up if
# unsuccessful every time.
$foo->get("http://wobbly.site.net");
if (!$mech->success and $mech->retry_failed) {
...
}
METHODS
init
Establish methods in Pluggable's namespace and set up hooks.
retry_if
Sets up the subroutine to call to see if this is a failure or not.
posthook
Handles the actual retry, waiting and recursively calling get() as needed.
AUTHOR
Joe McMahon, <mcmahon@yahoo-inc.com>
BUGS
Please report any bugs or feature requests to bug-www-mechanize-plugin-retry@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Mechanize-Plugin-Retry. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 Joe McMahon, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.