develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #78194] Referencing a PADTMP twice produces two copies

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 27, 2013 06:12
Subject:
[perl #78194] Referencing a PADTMP twice produces two copies
Message ID:
rt-3.6.HEAD-17099-1374905543-919.78194-14-0@perl.org
On Fri Jan 13 13:16:42 2012, patcat88 wrote:
> On Sun Jan 08 14:21:34 2012, sprout wrote:
> ................................
> > Taking a reference to $_ twice should not create references to two
> > different variables.  The implementation details are leaking through.
> > 
> I'll add my PerlMonks discussion to this
> http://www.perlmonks.org/?node_id=941973 . PADTMPs should always be
> copied (or sv body stolen ??), not referenced. srefgen/S_refto and newRV
> do different things but they should be the same. PADTMPs are supposed to
> be allocated and dealloced on block enterance/leaving, but under the
> hood are effectively closures or C function level static. Its a mess.

This part is not resolved.  I’m reopening it.

-- 

Father Chrysostomos


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About