|Welcome to the Monastery|
Re^2: Syntax explanation required (uniq)by LanX (Chancellor)
|on Jan 03, 2013 at 01:58 UTC||Need Help??|
I was meditating about advising List::MoreUtils:uniq as a best practice, cause I thought it prevents any stringification problems.¹
Unfortunately it doesn't! :(
thats quite disappointing for an XS-module ...
EDIT: Well at least it preserves order...
¹) I should explain, the problem with using hashes for set operations is that keys are stringified, that means working with anything which isn't a string or at least a scalar comes with a risk.
Practically it's not possible to safely use a ref as a key because of the resulting string is irreversible.
improved code example...