-
Notifications
You must be signed in to change notification settings - Fork 581
Apparent failure to localize %^H #13514
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
Comments
From @khwilliamsonThis is a bug report for perl from khw@karl.(none), Thanks to Matthew Horsfall for helping diagnose this This program: use Data::Dumper; sub { tr/\x{345}/\x{370}/ } prints out $VAR1 = { If the commented line is uncommented-out, it instead prints $VAR1 = {}; What is happening is that $x points to the hints hash at compile time, The 'uc', if included, causes utf8_heavy to run before the tr/// calls It seems to me that the hints hash is not getting localized properly. Reordering the tests in B::Deparse.t causes this to show up. The order Flags: Site configuration information for perl 5.19.8: Configured by khw at Tue Jan 7 07:43:12 MST 2014. Summary of my perl5 (revision 5 version 19 subversion 8) configuration: @INC for perl 5.19.8: /home/khw/blead/lib/perl5/site_perl/5.19.8/i686-linux-thread-multi-64int-ld Environment for perl 5.19.8: PATH=/home/khw/bin:/home/khw/perl5/perlbrew/bin:/home/khw/print/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/home/khw/cxoffice/bin |
From @cpansproutOn Tue Jan 07 13:58:34 2014, public@khwilliamson.com wrote:
Knowing how %^H works, I think what you see is actually correct behaviour. %^H is not localised unless the HINT_LOCALIZE_HH bit is set in $^H. Unlike local(), this localisation is different in that exiting to an outer compilation scope that did not localise %^H causes the outer scope to get a new %^H, so it appears that what was originally the outer scope’s %^H is ‘stolen’ by the inner scope that localises it.
I think the bug is in B::Deparse. It should not be deparsing %^H unless the hint in $^H is set. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sat, Jan 18, 2014 at 09:46:04PM -0800, Father Chrysostomos via RT wrote:
On the other hand, setting HINT_LOCALIZE_HH in Perl_save_re_context() Opinions? I looked at this issue to try and fix the Deparse.t TODO test accidentally Inline Patchdiff --git a/regcomp.c b/regcomp.c
index 5d5332d..aa532c3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -17749,6 +17749,7 @@ Perl_save_re_context(pTHX)
save_scalar(gv);
}
}
+ PL_hints |= HINT_LOCALIZE_HH;
}
#endif
-- "Procrastination grows to fill the available time" |
From @khwilliamsonOn 04/03/2015 03:31 PM, Dave Mitchell wrote:
Not knowing the nuances, it sounds like a good idea to me.
|
From @cpansproutOn Fri Apr 03 14:31:38 2015, davem wrote:
I have not looked into this deeply, but I suspect that will simply cover up the problem, which it may be possible to trigger another way. I do think the bug is in B::Deparse.
-- Father Chrysostomos |
From @iabynOn Tue, Apr 07, 2015 at 02:42:49PM -0700, Father Chrysostomos via RT wrote:
Just to be clear - what particular flag in $^H do you feel should be set -- |
From @jkeenanOn Wed Apr 08 08:47:23 2015, davem wrote:
Father C, Dave, khw: Do we know how we should move forward on this ticket? Thank you very much. -- |
From @khwilliamsonOn Wed, 09 Dec 2015 18:33:00 -0800, jkeenan wrote:
I don't know how to move forward on this, and no one else has responded in over a year. How about now? |
From @khwilliamsonIt turns out that this was fixed by Move UTF-8 case changing data into core |
@khwilliamson - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#120950 (status was 'resolved')
Searchable as RT120950$
The text was updated successfully, but these errors were encountered: