New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assigning hashref to symtable not an error since (somewhere before 5.21.10 ) #15409
Comments
From @kentfredricOnly managed to narrow it happening between 5.20.0 and 5.21.10 somewhere On 5.20.0, the following code is illegal and dies with "Cannot convert a reference to HASH to typeglob at /tmp/wtf.pl line 13." <---> BEGIN { print ref Foo::bar() || 'nothing'; <---> On 5.21.10+ , Foo::bar() silently returns undef. Perl Info
|
From @cpansproutOn Sat Jun 25 00:09:09 2016, kentfredric wrote:
The changes in how subroutines are stored in stashes are probably responsible. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sat Jun 25 07:13:49 2016, sprout wrote:
No, they are not. It was: 211a434 is the first bad commit Avoid vivifying stuff when looking up barewords That was an optimisation and regression fix. In fact, it restored the 5.10 behaviour: $ perl5.12 -e 'BEGIN {$Foo::{bar} = {}} Foo::bar()' So this was not terribly consistent to begin with. :-) -- Father Chrysostomos |
From @cpansproutOn Sat Jun 25 07:31:51 2016, sprout wrote:
Even more interesting is that the behaviour changes back if I add the ampersand: $ perl5.10 -e 'BEGIN {$Foo::{bar} = {}} &Foo::bar()' (5.8.7 still gives ‘Undefined subroutine’.) -- Father Chrysostomos |
From @cpansproutOn Sat Jun 25 07:31:51 2016, sprout wrote:
It’s being treated as a constant: $ ./perl -Ilib -MO=Concise -e 'BEGIN {$Foo::{bar} = {}} Foo::bar()' BTW, perlmod says: The results of creating new symbol table entries directly or modifying any So this is technically not a bug. :-) -- Father Chrysostomos |
Migrated from rt.perl.org#128479 (status was 'open')
Searchable as RT128479$
The text was updated successfully, but these errors were encountered: