Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Bizarro %+ hash slice bug in Perl 5.10 to 5.14.

by dave_the_m (Parson)
on Jun 17, 2012 at 16:58 UTC ( #976671=note: print w/ replies, xml ) Need Help??


in reply to Bizarro %+ hash slice bug in Perl 5.10 to 5.14.

It was fixed by the following commit, which is a more general fix than just %+:

commit 6f48390ab209d16ee8f795f0a83677c8bd9ac69c Author: Father Chrysostomos <sprout@cpan.org> Date: Wed Jan 4 23:28:54 2012 -0800 [perl #95548] Returned magical temps are not copied return and leavesub, for speed, were not copying temp variables wi +th a refcount of 1, which is fine as long as the fact that it was not c +op- ied is not observable. With magical variables, that *can* be observed, so we have to fore +go the optimisation and copy the variable if itís magical. This obviously applies only to rvalue subs.

Dave.


Comment on Re: Bizarro %+ hash slice bug in Perl 5.10 to 5.14.
Download Code
Re^2: Bizarro %+ hash slice bug in Perl 5.10 to 5.14.
by tobyink (Abbot) on Jun 17, 2012 at 18:30 UTC

    Ah, this looks like it! The diff can be found here.

    The commit included a couple of tests, but I'll send p5p my test file too, just in case they want it.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976671]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-10-20 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (75 votes), past polls