02 Aug 2006 20:41:42 UTC
- Distribution: App-SimpleScan-Plugin-Retry
- Module version: 1.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (0 / 0 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: unknown
- Activity24 month
- Download (5.22KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMCMAHON Joe McMahon
- CONFIGURATION AND ENVIRONMENT
- BUGS AND LIMITATIONS
- LICENCE AND COPYRIGHT
- DISCLAIMER OF WARRANTY
App::SimpleScan::Plugin::Retry - implement retry pragma/command line option
This document describes App::SimpleScan::Plugin::Retry version 1.00
simple_scan --retry 6 or in a simple_scan input file: %%retry 6
Both of these would retry fetches up to 6 times, pausing an increasingly-long time between each try. If all attempts fail, the failure reported with the last fetch is reflected back to the test program; if at any point the fetch succeeds, further retry attempts are abandoned.
simple_scanto use the
retryfunction implemented by the
This allows you to retry a transaction multiple times; it checks
$mech-success> to see if the transaction was successful.
If you need more sophisticated retry testing, you're better off scripting this yourself using
WWW::Mechanize::Plugin::Retry. One way is to use the
%%retrypragma in input to
simple_scan --gento generate skeleton code, and then replace the call to
retry_ifwith the appropriate status check subroutine (see
WWW::Mechanize::Pluggable::Retryfor more details).
Options supported by this plugin:
--retry, with one argument, the retry count.
Pragmas supported by this plugin:
%%retry, same arguments as --retry.
Setter/getter for the current retry count. Used by both the pragma and the command-line option to store the argument value.
retry_pragma Implements the actual code: stacks a call to
mech-retry> on the outgoing code stream, or a call to
failif the argument is not a number.
Generates a virtual
%%retrypragma for the value given on the command line.
Allows you to specify a global retry count for the input file to be processed. If the input file contains
%%retrypragmas, the count will be reset as these pragmas are encountered.
Set the retry count immediately to the new count specified as the argument.
%%retry 3 http://unsteady.org/ /.../ Y Look for expected text %%retry 0 http://steady.org/ /.../ Y Same text
A retry count of zero means that the fetch will not be retried.
Issued by the generated test code if Perl can't parse the retry count (either from a pragma or the command line) as a valid number.
App::SimpleScan::Plugin::Retry requires no configuration files or environment variables.
This only retries fetch failures; a more flexible means of testing "did it work?" is probably in order.
Please report any bugs or feature requests to
email@example.com, or through the web interface at http://rt.cpan.org.
Copyright (c) 2005, 2006 Yahoo! and Joe McMahon
<firstname.lastname@example.org >. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Module Install Instructions
To install App::SimpleScan::Plugin::Retry, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install App::SimpleScan::Plugin::Retry
For more information on module installation, please visit the detailed CPAN module installation guide.