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

Re: When is a GV not a glob?

Thread Previous
Father Chrysostomos
September 12, 2011 14:08
Re: When is a GV not a glob?
Message ID:

On Sep 12, 2011, at 1:45 PM, Nicholas Clark wrote:

> On Sun, Sep 11, 2011 at 06:12:03PM -0700, Father Chrysostomos wrote:
>> Answer: When it has no GP.
>> When does occur? Is it possible to eliminate this exceptional case? (There is code all over the place to deal with it.)
> I'm not sure what they are used for now.
> They were being used to store PVBMs, but I a month or two ago I "fixed" that
> that PVBMs are now stored as PVMGs. They were used in pads, but they don't
> seem to be now. (I think that only SVt_PVNVs and SVt_PVMGs are used now)
> IIRC they're not used to store stringified globs, thanks to sv_unglob()
> being used to convert SVt_PVGV to SVt_PVMG.
> I'm not sure *if* there are even exceptional cases now. If there are, it
> would be good to eliminate them.
> I thought that PVLVs have to be a superclass of PVGVs, as LVALUEs can refer
> to globs. Given that LVALUEs have to be able to refer to more regular scalar
> types, doesn't this still mean that some glob-related complexity has to
> remain, even if it's only for SVt_PVLV

I’m trying to eliminate fake globs. PVLVs only ever hold fake ones.

However, even if that plan fails, I don’t see why we need this all over the place:

    case SVt_PVGV:
        if (isGV_with_GP(sv)) {
        /*FALL THROUGH*/

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