Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Sub::Timebound 1.01

    Download button

    No screenshots available
    Downloads: 288  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ramana Mokkapati | More programs
    Perl Artistic License / FREE
    May 4th, 2007, 01:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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([TimeAllocated], [NumberOfAttempts],
    [PauseBetweenAttempts],[CodeRef],[Param1], [Param2], ...);


    [TimeAllocated] - Seconds allocated to [CodeRef] to complete
    [NumberOfAttempts] - Number of attempts made to [CodeRef]
    [PauseBetweenAttempts] - Seconds to wait before making subsequent attempts
    [CodeRef] - Reference to subroutine
    [Param1]... - Parameters to subroutine

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    timebound computations | create computations | Perl module | Sub::Timebound | timebound | computations

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM