Subject: | references should not be stored in hash hint |
in lib/constant/lexical.pm the import function is storing a reference in the hash hint
# $^H{+__PACKAGE__} ||= bless[]
view online grep:
https://grep.metacpan.org/search?qci=&q=%5C%24%5C%5EH.*%3D.*%5C%5B&qft=&qd=constant-lexical
The hints hash (%^H) cannot be used to store hashrefs as values,
so any implementation that relies on putting hashrefs in %^H is
intrinsically broken.
See "Implementation details" in the perlpragma manpage.
https://perldoc.perl.org/perlpragma.html#Implementation-details
You can also view Damian Conway workaround with Lexical::Hints module
for a clean work-around for this (annoying) limitation with %^H.