develooper Front page | perl.perl5.porters | Postings from December 2009

[perl #71686] [PATCH] Globs that are in symbol table can be un-globbed

Thread Previous | Thread Next
Lubomir Rintel via RT
December 29, 2009 05:18
[perl #71686] [PATCH] Globs that are in symbol table can be un-globbed
Message ID:
On Mon Dec 28 12:20:49 2009, lkundrak wrote:
> If a symbol table entry is undefined when a glob is assigned into it,
> it
> gets a FAKE flag which makes it possible to be downgraded when non-
> glob
> is subsequently assigned into it. It doesn't really matter, until we
> decide to localize it -- it wouldn't be possible to restore its GP
> upon
> context return if it changed type, therefore we must not do that.
> This patch turns off FAKE flag when localizing a GV and restores it
> when
> the context is left. A test case is included.

On the other hand, a more correct solution would be to preserve the FAKE
flag and put GV (at least flags, name and stash) on savestack. That
would allow coercing of localized fake hashes and upgrade them back on
context leaves, but would not be as simple as this.

Should I attempt to prepare a patch that does that instead?

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