Tie::Timely - Time out scalar values
use Tie::Timely; my $interval = 5; tie my $scalar, 'Amelia', $interval; # now $scalar is 'Amelia' sleep 6; # now the interval has elapsed and the value is forgotten # set the value again and it starts a new interval $scalar = 'Llama';
This module creates a tied scalar that forgets its value after the interval that you specify. The next time you set the value it resets the interval;
This source is in Github:
brian d foy,
Copyright © 2005-2021, brian d foy <email@example.com>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.