Subject: | hash hint should not be used to store references |
autodial::Scope::GuardStack::push_hook is using the hint hash %^H to store some references...
this is a bad idea.
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
noticed issues there:
https://github.com/pjf/autodie/blob/master/lib/autodie/Scope/GuardStack.pm#L28
and POD also suggest to store references in hash hint
https://github.com/pjf/autodie/blob/master/lib/autodie/Scope/Guard.pm#L35
also discussed there: https://github.com/pjf/autodie/issues/84
but looks like RT is the official bug tracker so opening a case there too