The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Array::Frugal - Arrays that re-use deleted indices

SYNOPSIS

  use Array::Frugal;
  my $stash = new Array::Frugal;
  $index = $stash->PUSH(34);
  print $stash->FETCH($index);  # prints 34;
  $stash->DELETE($index); # $index can be re-used now
  

DESCRIPTION

Frugal as in memory use. Instead of continuing to count upwards toward MAXINT, when an element is deleted from a frugal array the index is available for re-use.

Currently new, PUSH, FETCH, STORE, and DELETE are all the methods that are defined, but this may become tieable in a future release.

HISTORY

0.01

Original version;

SEE ALSO

AUTHOR

david l nicol, <davidnico@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by david l nicol

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.