in reply to Need a better name for a module...
List::Aged perhaps ? or maybe List::Expires ?
Update:It occurs to me I might be clearer with an example:
Then again, a list would denote values that don't have to be unique. The exists() routine sort of denotes unique members. Blech.use List::Aged; my $list=List::Aged->new(); $list->add( -expires => "60 seconds", "some","list", "of","random","stuff"); $list->add( -expires => "10 hours", "whee"); $list->exists("random"); # true, for now sleep(61); $list->exists("random"); # false now $list->exists("whee"); # true
|
|---|