In hv.c is written, that keys (hek-structure) are shared for space optimization. But i don't find any example for that.
If i use this hashes $rgb{rot}='aaa ';$cmyk{rot}='aaa'. Is the key 'rot' shared between them?
If i look in the output of:
perl -MDevel::Peek -e '$rgb{rot}="aaa";$cmyk{rot}="aaa";Dump(\%rgb);Du
+mp(\%cmyk)'
I don't see any shared keys:
SV = RV(0x1351ba8) at 0x1351b98
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x136ecf0
SV = PVHV(0x1357fb0) at 0x136ecf0
REFCNT = 2
FLAGS = (SHAREKEYS)
ARRAY = 0x1392a30 (0:7, 1:1)
hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
RITER = -1
EITER = 0x0
Elt "rot" HASH = 0xaffb6cf6
SV = PV(0x134fb78) at 0x1351d48
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x1369340 "aaa"\0
CUR = 3
LEN = 8
SV = RV(0x1351ba8) at 0x1351b98
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x1378990
SV = PVHV(0x1357fd8) at 0x1378990
REFCNT = 2
FLAGS = (SHAREKEYS)
ARRAY = 0x1368fa0 (0:7, 1:1)
hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
RITER = -1
EITER = 0x0
Elt "rot" HASH = 0xaffb6cf6
SV = PV(0x134fc58) at 0x1351f88
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x13652c0 "aaa"\0
CUR = 3
LEN = 8