Jon Portnoy > List-Objects-WithUtils-1.010001 > List::Objects::WithUtils::Array::Immutable

Download:
List-Objects-WithUtils-1.010001.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.010001   Source   Latest Release: List-Objects-WithUtils-2.014002

NAME ^

List::Objects::WithUtils::Array::Immutable - Immutable array objects

SYNOPSIS ^

  use List::Objects::WithUtils 'immarray';

  my $array = immarray(qw/ a b c /);

  my ($head, $rest) = $array->head;

DESCRIPTION ^

A subclass of List::Objects::WithUtils::Array without the following list-mutating methods:

  clear
  set
  pop push
  shift unshift
  delete
  insert
  splice

The array is marked read-only; attempting to call the methods listed above or manually modify the backing ARRAY reference will throw an exception.

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

Licensed under the same terms as Perl.

syntax highlighting: