diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-05-10 04:17:58 -0300 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-09-11 10:28:29 +1000 |
commit | cd164bf88bb56ea9f7d923d7c03669439d81240d (patch) | |
tree | 9dd765c2517071972baced25d8862c9634d39e0a /gv.c | |
parent | 9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd (diff) | |
download | perl-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 */ |