develooper Front page | perl.perl5.porters | Postings from September 2010

Re: [PATCH] Re: [perl #77362] Assigning glob to lvalue causes stringification

Thread Previous
From:
Father Chrysostomos
Date:
September 5, 2010 13:45
Subject:
Re: [PATCH] Re: [perl #77362] Assigning glob to lvalue causes stringification
Message ID:
753ACD49-AB51-40BB-BAD1-7DAC22A6949B@cpan.org

On Aug 29, 2010, at 12:49 PM, Father Chrysostomos wrote:

> On, Wed, 25 Aug 2010 17:27:18 +0100, Dave Mitchell wrote:
>> On Sun, Aug 22, 2010 at 12:24:36PM -0700, Father Chrysostomos wrote:
>>> Take this bit, for instance:
>>>    case SVt_PVGV:
>>> 	if (isGV_with_GP(sstr) && dtype <= SVt_PVGV) {
>>> 	    glob_assign_glob(dstr, sstr, dtype);
>>> 	    return;
>>> 	}
>>> 
>>> Should that SVt_PVGV be changed to SVt_PVLV, or would that have strange
>>> side-effects? (This same logic occurs in several other places in the
>>> same function.)
>> 
>> Answer: yes, it should probably be changed. Try it and see if anything
>> breaks!
> 
> One test fails, and dozens of other things break without any tests failing, because so many parts of the perl source code don’t take globs-as-PVLVs into account. So, in trying to fix one little niggling bug, I’ve set off a chain reaction. :-) I’ve fixed all of those I know about. I tried to avoid a megapatch, but the problems turned out to be so intertwined that I couldn’t help it. 

Here is a better patch that avoids a void warning.

Thread Previous


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