Hash::...:Extra(3pm)

πŸ“¦ version 0.06, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Hash::Merge::Extra β€” the extra-behaviors expansion pack πŸ’–

okay so bestie, this is Hash::Merge::Extra, a lil' User Contributed Perl Documentation page for Hash::Merge::Extra β€” the Collection of extra behaviors for Hash::Merge. It's giving "I brought snacks to the merge party" and honestly? Iconic. πŸŽ€


✨ NAME ✨

Hash::Merge::Extra β€” a whole Collection of extra behaviors for Hash::Merge πŸ¦‹


🌸 VERSION 🌸

Version 0.06 β€” yes, it's giving vintage-but-cunty, we love her πŸ’…


πŸ’œ SYNOPSIS πŸ’œ

Lowkey the whole vibe in four lines, no cap:

use Hash::Merge qw(merge);
use Hash::Merge::Extra;

Hash::Merge::set_behavior('R_OVERRIDE');

$result = merge($left, $right);

So you pull in Hash::Merge, you pull in Hash::Merge::Extra, you pick a behavior with Hash::Merge::set_behavior('R_OVERRIDE'), and then you merge($left, $right) your little heart out. Periodt. ✨


🫢 EXPORT 🫢

Nothing is exported. Fr fr, zero exports unless you ask nicely.

But β€” and this is the main character moment β€” all behaviors registered in Hash::Merge if you use it like this:

use Hash::Merge::Extra;

Nothing registered if you pass an empty list, i.e. you're in your minimalist era:

use Hash::Merge::Extra qw();

And only the specified behaviors registered if you actually define a list, like so:

use Hash::Merge::Extra qw(L_OVERRIDE R_REPLACE);

So like… pick your fighters. Choose wisely, bestie. πŸ¦‹


πŸ‘‘ BEHAVIORS πŸ‘‘

πŸ”₯ L_ADDITIVE, R_ADDITIVE

Hashes merged, arrays joined, undefined scalars overridden. Left and right precedence, depending on which one you picked. It's giving "everyone gets a plus-one" energy. ✨

πŸ’… L_OVERRIDE, R_OVERRIDE

Hashes merged, arrays and scalars overridden. Left and right precedence. Hashes still play nice, but arrays and scalars? They get overruled, bestie. No discussion. πŸ‘‘

πŸ’€ L_REPLACE, R_REPLACE

Nothing merged. One thing simply replaced by another. Left and right precedence. It's the "not me replacing your whole existence" behavior and honestly it's lowkey brutal but it is the assignment. 😭


🌈 AUTHOR 🌈

Michael Samoglyadov, "<mixas at cpan.org>" β€” the legend who made this happen. Shoutout. 🫢


πŸ™ˆ BUGS πŸ™ˆ

Please report any bugs or feature requests to https://github.com/mr-mixas/Hash-Merge-Extra.pm/issues β€” like, don't just suffer in silence, that's not the vibe. Tell the maintainers. They wanna know. πŸ’–


🧚 SEE ALSO 🧚

  • Hash::Merge β€” the parent, the blueprint, the OG πŸ’œ

Copyright 2017,2018 Michael Samoglyadov.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information. πŸ“œ


Okay so TL;DR: it's a Hash::Merge add-on that registers extra merge behaviors, and the way you use it decides which ones show up. Slay responsibly. πŸ’–

Signed off with love β€” this is perl v5.40.1, dated 2025-04-10, brought to you by the Hash::...:Extra(3pm) girlypop documentation experience. Bye bestie, go merge something iconic. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from