Skip Menu |

This queue is for tickets about the Web-Simple CPAN distribution.

Report information
The Basics
Id: 128077
Status: rejected
Priority: 0/
Queue: Web-Simple

People
Owner: Nobody in particular
Requestors: me [...] eboxr.com
Cc:
AdminCc:

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



Subject: CSS::Declare:: _install_unexporter abd XML::Tags::_install_unexporter are storing references in hash hint
CSS::Declare:: _install_unexporter abd XML::Tags::_install_unexporter are storing references in hash hint online grep: https://grep.metacpan.org/search?qci=&q=%5C%24%5C%5EH.*%3D.*bless&qft=&qd=Web-Simple # $^H{'CSS::Declare::Unex'} = bless($unex, 'CSS::Declare::Unex'); # $^H{'XML::Tags::Unex'} = bless($unex, 'XML::Tags::Unex'); 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.
we should close this ticket, as I opened it as part of a bulk issues creation after reading it, it seems a perfectly valid use case, where we use the fact that the object stored in the hint hashed is going to be destroyed when going outside of scope sorry for the noise On Thu Dec 20 15:57:49 2018, atoomic wrote: Show quoted text
> CSS::Declare:: _install_unexporter abd XML::Tags::_install_unexporter > are storing references in hash hint > > online grep: > https://grep.metacpan.org/search?qci=&q=%5C%24%5C%5EH.*%3D.*bless&qft=&qd=Web- > Simple > > # $^H{'CSS::Declare::Unex'} = bless($unex, 'CSS::Declare::Unex'); > # $^H{'XML::Tags::Unex'} = bless($unex, 'XML::Tags::Unex'); > > 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.
Closing as not a bug.