This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make evals' lexicals visible to nested evals
authorChip Salzenberg <chip@atlantic.net>
Thu, 19 Dec 1996 04:11:33 +0000 (16:11 +1200)
committerChip Salzenberg <chip@atlantic.net>
Thu, 19 Dec 1996 23:14:00 +0000 (11:14 +1200)
pp_ctl.c

index 78e1c99..6018793 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1900,6 +1900,7 @@ int gimme;
     dSP;
     OP *saveop = op;
     HV *newstash;
+    CV *caller;
     AV* comppadlist;
 
     in_eval = 1;
@@ -1916,9 +1917,11 @@ int gimme;
     SAVEI32(min_intro_pending);
     SAVEI32(max_intro_pending);
 
+    caller = compcv;
     SAVESPTR(compcv);
     compcv = (CV*)NEWSV(1104,0);
     sv_upgrade((SV *)compcv, SVt_PVCV);
+    CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc(caller);
 
     comppad = newAV();
     comppad_name = newAV();