Revision history for Hash-Wrap 1.09 2026-03-18 15:56:10 EDT [DOCUMENTATION] * actually document new flag -lexical [MISC] * fiducial public repository is now on codeberg.org 1.08 2026-03-18 13:05:08 EDT [ENHANCEMENT] * new flag -lexical: on Perl >= v5.38, creates lexical subs in importing package 1.07 2025-10-24 10:58:22-04:00 America/New_York [BUILD] * test for 1.06 fix failed under < Perl 5.18 1.06 2025-10-23 17:45:42-04:00 America/New_York [ENHANCEMENT] * version 1.05 introduced a bug making hashes immutable if the -immutable attribute was specified, regardless of its value. 1.05 2025-10-19 22:22:19-04:00 America/New_York [ENHANCEMENT] * -immutable can take an arrayref of attributes, which will add any not defined to the object before it is locked. 1.04 2025-01-06 10:19:52-05:00 America/New_York [BUG FIX] * fix rt #156087: "Syntax error with perl < 5.18". ++srezic! 1.03 2024-05-09 15:25:05-04:00 America/New_York [BUG FIX] * incorrect value was returned first time an object at a lower level was returned for an immutable, recursive, copied wrapper. 1.02 2024-05-03 13:21:48-04:00 America/New_York [ENHANCEMENT] * new option '-into', allowing installation of the constructor in a package other than that of the caller's. * the '-class' option now prefers '-target' over '-caller', but still accepts the latter. 1.01 2024-03-01 10:48:51-05:00 America/New_York [TESTS] * fix tests to require same Perl version as module (5.10) rather than 5.18. 1.00 2024-02-29 16:28:02-05:00 America/New_York [BEHAVIOR CHANGE] * wrapping an object is an error. Previously hash *values* which were blessed hashes were not wrapped, but the actual passed hash reference was allowed to be a blesed hash. This change makes the behavior consistent. [BUG FIX] * if the -copy attribute was set, recursively wrapped sub-hashes did not correctly update their parent hash to point at the copy of the sub-hash. [DOCUMENTATION] * describe interaction with input immutable hashes * document "eventually" immutable operation with -copy,-immutable on mutable hashes. 0.22 2022-02-09 11:53:27-05:00 America/New_York * correct version numbers in distributed code * no function changes 0.21 2022-02-09 11:53:27-05:00 America/New_York [BUG FIX] * remove draft code which shouldn't have gone into the release. 0.20 2022-02-09 11:53:27-05:00 America/New_York [BUG FIX] * -predicate option was totally broken. no tests. sigh. 0.19 2022-01-06 22:52:29-05:00 America/New_York [BUG FIX] * the can() method didn't acknowledge the existence of 'exists', 'defined', or predicate methods. * recursively built constructors didn't use attributes passed to the top level constructor (like -exists, -defined, etc). 0.18 2021-08-11 16:17:38-04:00 America/New_York [ENHANCEMENT] * -predicate option provides has_foo style predicate methods. 0.17 2021-07-07 23:27:11-04:00 America/New_York [BUG FIX] * 0.16 broke -immutable * tests didn't distinguish between compile errors and actual errors. 0.16 2021-07-07 23:27:11-04:00 America/New_York [BUG FIX] * previous release broke custom cloning. 0.15 2021-07-07 23:27:11-04:00 America/New_York [ENHANCEMENT] * a reference to the constructor may now be stored in a user provided scalar via -as => \$scalar. This avoids pollution of the caller's namespace. * recursive hash wrapping is now possible with -recurse, which specifies the recursion level limit * constructors may now be returned from the import() method via -as => -return. 0.14 2021-06-21 16:39:56-04:00 America/New_York [ENHANCEMENT] * methods can be added to the wrapping class via the -methods option. [BUILD] * use META.json instead of cpanfile as build-from-repo artifact 0.13 2021-04-01 15:45:07-04:00 America/New_York [ENHANCEMENT] * the -class option can take the value '-caller', which causes the class name to be determined from the calling package name and the constructor name. 0.12 2019-11-07 09:50:32-05:00 America/New_York [BUG FIX] * tests added in 0.11 were not backwards compatible with Perl < 5.18 0.11 2019-11-06 14:08:02-05:00 America/New_York [ENHANCEMENT] * new -immutable option, prevents adding keys or changing values. * new -lockkeys option, allows only specified keys in hash. 0.10 2019-09-25 13:59:31-04:00 America/New_York [BUG FIX] * can() produced erroneous and uncompileable code if it was called for an existing attribute which had not yet had an accessor created. 0.09 2019-06-20 16:57:19-04:00 America/New_York [ENHANCEMENT] * wrap_hash may now be called with no arguments, in which case it autogenerates a hash for you. 0.08 2018-02-27 10:57:06-05:00 America/New_York [API BREAKAGE] * Perl 5.10 is now the minimum version supported * the -create option is no longer available. wrapper classes are always created. * modifying existing classes via -class is no longer supported as it proved too messy. * classes no longer subclass from Hash::Wrap::Base. [ENHANCEMENT] * stand alone wrapper classes are now possible via -base * wrapper classes can have real constructors via -new * documentation has been rewritten (again!) * wrapper classes can be subclassed [INTERNALS] * much code refactoring * accessor generation is now much simpler and subsequently faster. * construction of the wrapper classes is simplified (no more searching parent classes for validation and signature subroutinesbuilders), so mro::compat is not required. 0.07 2018-01-29 11:59:46-05:00 America/New_York [ENHANCEMENT] * exceptions are now thrown from the correct call frame 0.06 2018-01-29 11:59:46-05:00 America/New_York [ENHANCEMENT] * new options -exists and -undefined add exists() and defined() methods. 0.05 2018-01-29 11:59:46-05:00 America/New_York [BUILD FIX] * t/api.t was not completely updated for changes in version 0.04 0.04 2018-01-29 11:59:46-05:00 America/New_York [ENHANCEMENT] * it is now possible to create accessors which return undef (rather than throwing an exception) if a hash element does not exist. * The underlying code has gone through a significant rewrite. 0.03 2017-09-28 21:56:42-04:00 America/New_York [BUG FIX] * The default import of wrap_hash was broken by version 0.02. 0.02 2017-09-28 14:49:16-04:00 America/New_York [ENHANCEMENT] * lvalue accessors are now available for Perl 5.16 or later. 0.01 2017-09-25 11:50:04-04:00 America/New_York * Initial release upon an unsuspecting world