summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-05-10 04:17:58 -0300
committerTony Cook <tony@develop-help.com>2013-09-11 10:28:29 +1000
commitcd164bf88bb56ea9f7d923d7c03669439d81240d (patch)
tree9dd765c2517071972baced25d8862c9634d39e0a /gv.c
parent9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd (diff)
downloadperl-cd164bf88bb56ea9f7d923d7c03669439d81240d.tar.gz
gv.c: Explain the purpose of the <none>:: stash a bit.
It's primarily a historical oddity. Its main purpose is to store variables after an exception from 'use strict "vars"': eval q{ use strict; $foo = 1 }; warn keys %{"<none>::"};
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index c84e56980e..afa6a5e955 100644
--- a/gv.c
+++ b/gv.c
@@ -1614,6 +1614,11 @@ S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len,
if (is_utf8)
SvUTF8_on(err);
qerror(err);
+ /* To maintain the output of errors after the strict exception
+ * above, and to keep compat with older releases, rather than
+ * placing the variables in the pad, we place
+ * them in the <none>:: stash.
+ */
gv = gv_fetchpvs("<none>::", GV_ADDMULTI, SVt_PVHV);
if (!gv) {
/* symbol table under destruction */