Changes for version 0.13 - 2009-12-07
- This is a major refactoring of the module. The goal is to make the code more flexible (e.g. adding future modes, changing prefix for each mode, etc). Configuration is also significantly expanded.
- rename dist: Data-PrefixMerge -> Data-ModeMerge (to reflect the fact that merging mode can be selected not only via a "prefix" but more generally by a regex test on key).
- incompatible behaviour: all hash prefixes on the left-side and right-side hash will be removed recursively after merge, even if it is not a hash-hash merge, e.g. mode_merge({a=>1}, {b=>{"+c"=>1}) used to become {a=>1, b=>{"+c"=>1}} but now it will become {a=>1, b=>{c=>1}}. this ensures that all prefixes are "cleaned" after merge.
- incompatible behaviour: KEEP prefix (^) is now always sticky so it always protects future merges (equivalent to old config's preserve_keep_prefix). If you want KEEP prefix to be removed after merge, set config C<readd_prefix> to 0.
- incompatible change: options key is now enabled by default, with "" (empty string) as the key.
- incompatible change: configuration 'parse_hash_key_prefix' renamed to 'parse_prefix'.
- removed: remove_keep_prefix(), replaced by the more generic remove_prefix().
- configurable prefix for each merging mode.
- new config: set_prefix allows you to change prefixes, even in the middle of recursive merge.
- new config: allow_override & disallow_override.
- new config: allow_create_array, allow_create_hash, allow_destroy_array, allow_destroy_hash.
- new config: exclude_parse, exclude_parse_regex, include_parse, include_parse_regex.
- new config: exclude_merge, exclude_merge_regex, include_merge, include_merge_regex.
- new config: disable_modes. each merging mode can now be individually enabled/disabled through configuration.
- options key now understands almost all configuration.
Modules
Merge two nested data structures, with merging modes and options
Data::ModeMerge configuration
Handler for Data::ModeMerge ADD merge mode
Base class for Data::ModeMerge mode handler
Handler for Data::ModeMerge CONCAT merge mode
Handler for Data::ModeMerge DELETE merge mode
Handler for Data::ModeMerge KEEP merge mode
Handler for Data::ModeMerge NORMAL merge mode
Handler for Data::ModeMerge SUBTRACT merge mode