Tie::Array::Expire - Array with expiring elements
This document describes version 0.001 of Tie::Array::Expire (from Perl distribution Tie-Array-Expire), released on 2017-06-07.
use Tie::Array::Expire; # the elements will expire/disappear after 5 minutes (300 seconds) tie my @ary, 'Tie::Array::Expire', 300; push @ary, 1, 2, 3; # 3 minutes later push @ary, 4, 5; unshift @ary, 6; # 3 minutes later print @ary; # (6 5 4) (the elements 1, 2, 3 have expired) # 5 minutes later print @ary; # () (the elements 6, 5, 4 have also expired)
This module allows you to create an array with the elements autodisappearing after a specified expiry time. This array can be used in, e.g.: rate control checking ("maximum sending 20 emails in 4 hours").
Please visit the project's homepage at https://metacpan.org/release/Tie-Array-Expire.
Source repository is at https://github.com/perlancar/perl-Tie-Array-Expire.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Tie-Array-Expire
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Algorithm::FloodControl
Tie::Array::QueueExpire
CHI
Tie::Scalar::Expire, Tie::Hash::Expire
perlancar <perlancar@cpan.org>
This software is copyright (c) 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Tie::Array::Expire, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Array::Expire
CPAN shell
perl -MCPAN -e shell install Tie::Array::Expire
For more information on module installation, please visit the detailed CPAN module installation guide.