NAME

Sub::Retry - retry $n times

SYNOPSIS

use Sub::Retry;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new();
my $res = retry 3, 1, sub {
    $ua->post('http://example.com/api/foo/bar');
};

DESCRIPTION

Sub::Retry provides the function named 'retry'.

FUNCTIONS

AUTHOR

Tokuhiro Matsuno

LICENSE

Copyright (C) Tokuhiro Matsuno

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