-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
As said elsewhere Hash::Merge... has design shortcomings. In your case the problem is apparent from the following oneliner:
perl -Ilib -e '
use RapidApp::Util "merge";
use Devel::Dwarn;
my $something_far_far_away = sub { Hash::Merge::set_behavior("LEFT_PRECEDENT") };
for (0, 1) {
$something_far_far_away->() if $_;
Dwarn [ merge( { foo => 1 }, { foo => 2 } ) ]
}
'
You must use an object with separate state as shown here (which fwiw can be cached). Sorry for not sending a PR - much yakshaving ahead.
Metadata
Metadata
Assignees
Labels
No labels