[Bast-commits] r5058 - Devel-Declare/1.000/trunk
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Wed Nov 5 23:55:50 GMT 2008
Author: rafl
Date: 2008-11-05 23:55:50 +0000 (Wed, 05 Nov 2008)
New Revision: 5058
Modified:
Devel-Declare/1.000/trunk/Declare.xs
Log:
Make things work within evals with a hint hash.
Modified: Devel-Declare/1.000/trunk/Declare.xs
===================================================================
--- Devel-Declare/1.000/trunk/Declare.xs 2008-11-05 23:52:56 UTC (rev 5057)
+++ Devel-Declare/1.000/trunk/Declare.xs 2008-11-05 23:55:50 UTC (rev 5058)
@@ -256,9 +256,16 @@
OP* dd_pp_entereval(pTHX) {
dSP;
- dPOPss;
STRLEN len;
const char* s;
+ SV *sv;
+#ifdef PERL_5_9_PLUS
+ SV *saved_hh;
+ if (PL_op->op_private & OPpEVAL_HAS_HH) {
+ saved_hh = POPs;
+ }
+#endif
+ sv = POPs;
if (SvPOK(sv)) {
if (dd_debug) {
printf("mangling eval sv\n");
@@ -275,6 +282,11 @@
SvGROW(sv, 8192);
}
PUSHs(sv);
+#ifdef PERL_5_9_PLUS
+ if (PL_op->op_private & OPpEVAL_HAS_HH) {
+ PUSHs(saved_hh);
+ }
+#endif
return PL_ppaddr[OP_ENTEREVAL](aTHX);
}
More information about the Bast-commits
mailing list