summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-16 18:18:23 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-17 09:18:02 -0800
commitf45b078d20e995d83ee8428c8f199c0e6eca92f9 (patch)
treec476f930761d33da5ed9c9217afd196d394c7e10 /embed.h
parent3973654ea25ef9a4fe80b488debf904c3291a92d (diff)
downloadperl-f45b078d20e995d83ee8428c8f199c0e6eca92f9.tar.gz
[perl #70151] eval localises %^H at runtime
It doesn’t any more. Now the hints are localised in a separate inner scope surrounding the call to yyparse. This meant moving hint-handling code from pp_require and pp_entereval into S_doeval. Some tests in t/comp/hints.t were testing for the buggy behaviour, so they have been adjusted. Basically, this fixes sub import { eval "strict->import" } which should work the same way as sub import { strict->import } but was not working because %^H and $^H were being localised to the eval at its run time, not just its compilation. So the values assigned to %^H and $^H at the eval’s run time would simply be lost.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.h b/embed.h
index 4aada8625f..8ed8d32b34 100644
--- a/embed.h
+++ b/embed.h
@@ -1428,7 +1428,7 @@
#define destroy_matcher(a) S_destroy_matcher(aTHX_ a)
#define do_smartmatch(a,b,c) S_do_smartmatch(aTHX_ a,b,c)
#define docatch(a) S_docatch(aTHX_ a)
-#define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d)
+#define doeval(a,b,c,d,e) S_doeval(aTHX_ a,b,c,d,e)
#define dofindlabel(a,b,c,d) S_dofindlabel(aTHX_ a,b,c,d)
#define doparseform(a) S_doparseform(aTHX_ a)
#define dopoptoeval(a) S_dopoptoeval(aTHX_ a)