App-SimpleScan-Plugin-Retry

 view release on metacpan or  search on metacpan

lib/App/SimpleScan/Plugin/Retry.pm  view on Meta::CPAN


=head2 retry

Setter/getter for the current retry count. Used by both the pragma and
the command-line option to store the argument value.

=head2 retry_pragma
Implements the actual code: stacks a call to C<mech->retry> on the
outgoing code stream, or a call to C<fail> if the argument is not 
a number.

=head2 validate_options

Generates a virtual C<%%retry> pragma for the value given on the command line.

=head1 OPTIONS

=head2 --retry

Allows you to specify a global retry count for the input file to be
processed. If the input file contains C<%%retry> pragmas, the count
will be reset as these pragmas are encountered.

=head1 PRAGMAS

=head2 %%retry

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.

=head1 DIAGNOSTICS

=head2 C<< "retry count '$args' is not a number >>

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.


=head1 CONFIGURATION AND ENVIRONMENT

App::SimpleScan::Plugin::Retry requires no configuration files or environment variables.


=head1 DEPENDENCIES

App::SimpleScan, WWW::Mechanize::Pluggable::Retry.


=head1 INCOMPATIBILITIES

None reported.


=head1 BUGS AND LIMITATIONS

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
C<bug-app-simplescan-plugin-retry@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.


=head1 AUTHOR

Joe McMahon  C<< <mcmahon@cpan.org > >>


=head1 LICENCE AND COPYRIGHT

Copyright (c) 2005, 2006 Yahoo! and 
Joe McMahon C<< <mcmahon@cpan.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 L<perlartistic>.


=head1 DISCLAIMER OF WARRANTY

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.



( run in 0.654 second using v1.01-cache-2.11-cpan-39bf76dae61 )