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

EO::WeakArray - arrays where all references contained are weak

SYNOPSIS

  use EO::WeakArray;
  my $thing = {};
  my $array = EO::WeakArray->new;
  $array->push( $obj );
  $obj = undef;

  if ( $array->at( 0 ) == undef ) {
    print "ok\n";
  }

DESCRIPTION

A WeakArray is similar to a normal array only its contents are not reference counted. Thus, if something destroys the contents from the outside world then it disappears from inside the array as well.

METHODS

WeakArrays provide no methods beyond those provided by an array.

AUTHOR

James A. Duncan <jduncan@fotango.com>

COPYRIGHT

Copyright 2004 Fotango Ltd. All Rights Reserved.

This module is released under the same terms as Perl itself.