Jon Portnoy > List-Objects-WithUtils-2.005001 > List::Objects::WithUtils::Role::Hash::Immutable

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

Dependencies

Annotate this POD

CPAN RT

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

NAME ^

List::Objects::WithUtils::Role::Hash::Immutable - Immutable hash behavior

SYNOPSIS ^

  # Via List::Objects::WithUtils::Hash::Immutable ->
  use List::Objects::WithUtils 'immhash';
  my $hash = immhash( foo => 1, bar => 2 );
  $hash->set(foo => 3);  # dies

DESCRIPTION ^

This role adds immutable behavior to List::Objects::WithUtils::Role::Hash consumers.

The following methods are not available and will throw an exception:

  clear
  set
  delete

(The backing hash is also marked read-only.)

See List::Objects::WithUtils::Hash::Immutable for a consumer implementation.

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

syntax highlighting: