Data::Object::Role::Immutable
Immutable Role for Perl 5
package Example; use Moo; with 'Data::Object::Role::Immutable'; package main; my $example = Example->new;
This package provides a mechanism for making any derived object immutable.
This package implements the following methods:
immutable() : Object
The immutable method returns the invocant as an immutable object, and will throw an error if an attempt is made to modify the underlying value.
# given: synopsis $example->immutable;
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Data::Object::Role::Immutable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object::Role::Immutable
CPAN shell
perl -MCPAN -e shell install Data::Object::Role::Immutable
For more information on module installation, please visit the detailed CPAN module installation guide.