Skip Menu |
 

This queue is for tickets about the Hash-Merge CPAN distribution.

Report information
The Basics
Id: 122879
Status: rejected
Priority: 0/
Queue: Hash-Merge

People
Owner: Nobody in particular
Requestors: ALTREUS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Arbitrarily specify merge condition
Download (untitled) / with headers
text/plain 327b
Would be great to be able to provide a subref that determines which of two conflicting values to keep. Alternatively, to provide merge strategies that consider the values rather than the source of the values (e.g. PRESERVE_GREATEST) In my use case, I'd like to keep the one that specifies a bigger version number, for example.
Download (untitled) / with headers
text/plain 739b
On Wed Aug 23 07:58:12 2017, ALTREUS wrote: Show quoted text
> Would be great to be able to provide a subref that determines which of > two conflicting values to keep. Alternatively, to provide merge > strategies that consider the values rather than the source of the > values (e.g. PRESERVE_GREATEST) > > In my use case, I'd like to keep the one that specifies a bigger > version number, for example.
You can already do that. Specify an own behavior, which is always called with the left and the right value and you can decide which one to keep. What is your concrete wish? Do you suggest some more default behaviors? If so, please send also their specifications, since what makes an array bigger or makes a hash greater heavily depends on perspective.
No details given, requested feature already supported.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.