Daniel Lo > Proc-BackOff > Proc::BackOff::Linear

Download:
Proc-BackOff-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Proc::BackOff::Linear

SYNOPSIS ^

Usage:

 use Proc::BackOff::Linear;

 my $obj = Proc::BackOff::Linear->new( { slope => 5, x => 'count', b => 0 );
 # On N'th failure delay would be set to:
 # y = slope * x + b;
 # 1st failure  :  5 * count + b = 5 * 1 + 0 = 5
 # 2nd failure  :  5 * 2 + 0 = 10
 # 3rd failure  :  5 * 3 + 0 = 15
 # 4th failure  :  5 * 4 + 0 = 20

See Proc::BackOff for further documentation.

Overloaded Methods ^

new()

Check for variables being set:

Required: slope b defaults to 0 x defaults to 'count'

calculate_back_off()

Returns the new back off value.

Changes ^

 0.02   2007-08-12 -- Daniel Lo
        - Documentation fixes.  No code changes.

 0.01    2007-04-17 -- Daniel Lo
        - Initial Version

AUTHOR ^

Daniel Lo <daniel_lo@picturetrail.com>

LICENSE ^

Copyright (C) PictureTrail Inc. 1999-2007 Santa Clara, California, United States of America.

This code is released to the public for public use under Perl's Artisitic licence.

syntax highlighting: