On Wed, Nov 01, 2000 at 03:00:32PM +0000, Marcel Grunauer wrote:
> NAME
>     Tie::Scalar::Timeout - Scalar variables that time out

Cool...

This is very similar to a module we wrote yesterday...

package Radioactive::Decay;
use strict;
sub TIESCALAR { bless [0,log(2)/$_[1], time], $_[0]; }
sub STORE     { $_[0]->[0] = $_[1] }
sub FETCH     { $_[0]->[0] * exp(-$_[0]->[1] * (time - $_[0]->[2])) }
sub DESTROY   {}
1;


Tony
-- 
-----------------------------------------------------------------------------
 Tony Bowden | Belfast, NI | [EMAIL PROTECTED] | www.tmtm.com | www.blackstar.co.uk
      numb and confused battered and bruised counter of cost and star-crossed
-----------------------------------------------------------------------------

Reply via email to