Sub::TimeboundSub::Timebound is a Perl extension for timebound computations. | |
Download |
Sub::Timebound Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ramana Mokkapati
- Publisher web site:
- http://search.cpan.org/~mvr/Sub-Timebound-1.01/lib/Sub/Timebound.pm
Sub::Timebound Tags
Sub::Timebound Description
Sub::Timebound is a Perl extension for timebound computations. Sub::Timebound is a Perl extension for timebound computations.SYNOPSIS use Sub::Timebound; sub fun { my $i = shift; if ($i =~ /7$/) { die "Simulated internal errorn"; } while ($i) { $i--; } return "All is well"; } my $x = timeboundretry(10, 3, 5, &fun, 10); ### Returns { value => '...', status => 0(FAILURE)/1(SUCCESS) } ### 'value' is the return value of fun() if ($x->{status}) { # SUCCESS $x->{value} } else { # FAILURE } Module exports "timeboundretry" - this is a wrapper that watches a function call. my $x = timeboundretry(, , ,,, , ...); - Seconds allocated to to complete - Number of attempts made to - Seconds to wait before making subsequent attempts - Reference to subroutine ... - Parameters to subroutine Requirements: · Perl
Sub::Timebound Related Software