This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Globs that are in symbol table can be un-globbed
authorLubomir Rintel (GoodData) <lubo.rintel@gooddata.com>
Thu, 22 Apr 2010 16:19:23 +0000 (18:19 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Mon, 26 Apr 2010 09:52:48 +0000 (11:52 +0200)
commitb9e00b79e4947c49d5520633f9efd2a8e39ec14f
treef870176dcfc5732189e4cca4c216ca4cb4600254
parent01146bad274273e459645fb4cce5aeac95999d64
Globs that are in symbol table can be un-globbed

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.
scope.c
sv.c
t/op/gv.t