Module to add deep merge functionality to Hashes
Perl6
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Hash
t
.gitignore
.travis.yml
META6.json
README.md

README.md

Build Status

method merge

method merge(
    %b,
    Bool:D :$no-append-array = Bool::False
) returns Mu

Merges a second hash into the hash the method is called on. Hash given as the argument is not modified. Traverses the full tree, replacing items in the original hash with the hash given in the argument. Does not replace positional elements by default, and instead appends the items from the supplied hash's array to the original hash's array. The object type of positionals is not retained and instead becomes an Array type. Use :no-append-array to replace arrays and positionals instead, which will also retain the original type and not convert to an Array