Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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

by dave_the_m (Prior)
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 <> 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.


Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976671]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2018-05-28 10:29 GMT
Find Nodes?
    Voting Booth?