summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-13 09:23:07 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-13 21:24:53 -0800
commitffdb8bcde21504a3efe208b4d47bea445e7e23fd (patch)
tree1f8ff020ce7bba74eddebec59c8bf26f13a7b0d8 /gv.c
parent65d99836546f370bdc29ff2d99a22de1f5fc3bbf (diff)
downloadperl-ffdb8bcde21504a3efe208b4d47bea445e7e23fd.tar.gz
defined *{"!"} should not stop %! from working
This is something I broke when merging is_magical_gv with gv_fetchpvn_flags. gv_fetchpvn_flags must make sure its *! glob is present in the sym- bol table it loads Errno. If it adds it afterwards it will clobber another *! that Errno has autovivified and tied in the mean time.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 4b4d9a6529..9da6c1a675 100644
--- a/gv.c
+++ b/gv.c
@@ -1892,7 +1892,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
/* magicalization must be done before require_tie_mod is called */
if (sv_type == SVt_PVHV || sv_type == SVt_PVGV)
+ {
+ if (addmg) (void)hv_store(stash,name,len,(SV *)gv,0);
+ addmg = 0;
require_tie_mod(gv, "!", newSVpvs("Errno"), "TIEHASH", 1);
+ }
break;
case '-': /* $- */