On Thu, Apr 30, 2015 at 05:23:55PM -0600, Karl Williamson wrote: > On 04/30/2015 02:17 PM, (Andreas J. Koenig) (via RT) wrote: > ># New Ticket Created by (Andreas J. Koenig) > ># Please include the string: [perl #124430] > ># in the subject line of all future correspondence about this issue. > ># <URL: https://rt.perl.org/Ticket/Display.html?id=124430 > > > > > > >Another one from Slaven: > > > >bisect > >------ > >commit 273e254d1663b9223905e4b5c3b6546671ba365e > >Author: Karl Williamson <khw@cpan.org> > >Date: Tue Mar 10 13:16:23 2015 -0600 > > > > Optimize out unicode_to_native(), native_to_unicode() > > > >rt.cpan ticket > >-------------- > >https://rt.cpan.org/Public/Bug/Display.html?id=103976 > > > > > > I was able to reproduce this problem, and chatted with Zefram on irc about > it. He believes that the problem lies with > https://github.com/clkao/invoker. To summarize, > > "the necessary and sufficient fix is for invoker_ck_entersub to check that > it's got an entersub op, and skip most of its check-time logic when it > doesn't" > > Also, "invoker ought to behave as a lexically-scoped pragma, rather than > globally affecting any use of $-" > > And, "this is partly down to the means by which invoker hooks the op > checker, which is via another CPAN module, the combination of the two is > broken, and will fail when it meets any call checker that rewrites an > entersub into some other kind of op. your commit merely introduces another > such rewriting checker" > > I've created > https://rt.cpan.org/Public/Bug/Display.html?id=104135 > against invoker BTW, I'm not convinced that the call checker is the right way to optimise away those functions, in that it is a compile-time check on the CV in the GV, whereas function calls are normally resolved by a run-time lookup of the CV in the GV; so for example the following doesn't print "hi": *utf8::unicode_to_native = sub { print "hi!\n" }; utf8::unicode_to_native($x); It's probably fairly unlikely that someone will want to override those functions, and it will still override if the override is done in a BEGIN/use, but its still not technically correct. -- If life gives you lemons, you'll probably develop a citric acid allergy.Thread Previous | Thread Next