summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1996-12-31 09:33:01 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-01 08:59:00 +1200
commit2c05e328191edda79c00062be53a6cd9c8f0be70 (patch)
tree582108f6de789d15f6e496e87efffda72146e9bd /pp_ctl.c
parent039955f4277358c9c5547e1aab4922272a3e649f (diff)
downloadperl-2c05e328191edda79c00062be53a6cd9c8f0be70.tar.gz
Hide lexicals from C<use>d or C<require>d module (!)
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 1350de4196..94b40520e7 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1590,6 +1590,7 @@ PP(pp_goto)
EXTEND(stack_sp, items); /* @_ could have been extended. */
Copy(AvARRAY(av), stack_sp, items, SV*);
stack_sp += items;
+ SvREFCNT_dec(GvAV(defgv));
GvAV(defgv) = cx->blk_sub.savearray;
AvREAL_off(av);
av_clear(av);
@@ -1682,7 +1683,7 @@ PP(pp_goto)
cx->blk_sub.savearray = GvAV(defgv);
cx->blk_sub.argarray = av;
- GvAV(defgv) = cx->blk_sub.argarray;
+ GvAV(defgv) = (AV*)SvREFCNT_inc(av);
++mark;
if (items >= AvMAX(av) + 1) {
@@ -1941,7 +1942,9 @@ int gimme;
av_store(comppadlist, 0, (SV*)comppad_name);
av_store(comppadlist, 1, (SV*)comppad);
CvPADLIST(compcv) = comppadlist;
- CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc(caller);
+
+ if (saveop->op_type != OP_REQUIRE)
+ CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc(caller);
SAVEFREESV(compcv);