List::Objects::WithUtils::Role::Hash::Immutable - Immutable hash behavior
# Via List::Objects::WithUtils::Hash::Immutable -> use List::Objects::WithUtils 'immhash'; my $hash = immhash( foo => 1, bar => 2 ); $hash->set(foo => 3); # dies
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 maybe_set delete
(The backing hash is also marked read-only.)
See List::Objects::WithUtils::Hash::Immutable for a consumer implementation.
Jon Portnoy <avenj@cobaltirc.org>
To install List::Objects::WithUtils, copy and paste the appropriate command in to your terminal.
cpanm
cpanm List::Objects::WithUtils
CPAN shell
perl -MCPAN -e shell install List::Objects::WithUtils
For more information on module installation, please visit the detailed CPAN module installation guide.