develooper Front page | perl.perl5.porters | Postings from June 2011

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

Thread Previous | Thread Next
Father Chrysostomos via RT
June 5, 2011 16:05
[perl #78194] Referencing a PADTMP twice produces two copies
Message ID:
On Sun Oct 03 14:08:37 2010, sprout wrote:
> $ perl  -le' for( "$y" ){print \$_.\$_}'
> SCALAR(0x8039f0)SCALAR(0x8038d0)
> (The same address should be printed twice.)
> It looks as though the TARG ought to be stolen by S_refto, and then
> replaced via pad_swipe or something similar.

It might be cleaner for not only S_refto, but also any op that aliases a
PADTMP to copy it. That would include for, map, grep, arguments to
subroutines, and the lhs of (...)x...

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About