Update::Immutable - React-compatible data-structure update utility
use Update::Immutable; my $orig = { a => 1 }; my $new = Update::Immutable::update($orig, { b => { '$set' => 2 } }); ## new: { a => 1, b => 2 } ## orig: { a => 1 }
This is a perl implementation of the react update function.
There are some additional features and bugfixes. For details, see the companion javascript module.
Update-Immutable github repo
The companion javascript module
Doug Hoyte, <doug@hcsw.org>
<doug@hcsw.org>
Copyright 2016 Doug Hoyte.
This module is licensed under the same terms as perl itself.
To install Update::Immutable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Update::Immutable
CPAN shell
perl -MCPAN -e shell install Update::Immutable
For more information on module installation, please visit the detailed CPAN module installation guide.