Steven Haryanto > Perinci-Sub-Property-retry > Perinci::Sub::Property::retry

Download:
Perinci-Sub-Property-retry-0.08.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.08   Source  

NAME ^

Perinci::Sub::Property::retry - Specify automatic retry

VERSION ^

version 0.08

SYNOPSIS ^

 # in function metadata
 retry => 3,

 # more detailed
 retry => {n=>3, delay=>10, success_statuses=>/^(2..|3..)$/},

DESCRIPTION ^

This property specifies retry behavior.

Values: a hash containing these keys:

Property value can also be an integer (specifying just 'n').

If function does not return enveloped result (result_naked=0), which means there is no status returned, a function is assumed to fail only when it dies.

This property's wrapper implementation currently uses a simple loop around the eval block.

It also pass a special argument to the function -retries so that function can be aware about retries.

SEE ALSO ^

Perinci

HOMEPAGE ^

Please visit the project's homepage at https://metacpan.org/release/Perinci-Sub-Property-retry.

SOURCE ^

Source repository is at https://github.com/sharyanto/perl-Perinci-Sub-Property-retry.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Sub-Property-retry

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: