summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>1998-06-04 09:47:31 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-10 06:33:16 +0000
commitfae75791d47423cf8816d13f7030c34cfdb1c512 (patch)
treed74d84d7a9ff9d13f4bfd9d6a3f04babc1d91f94 /scope.c
parentf9020f6850b61fb9b36e73fa4c437ad49d7d6b71 (diff)
downloadperl-fae75791d47423cf8816d13f7030c34cfdb1c512.tar.gz
Invalidate method cache on C<local *subname>
Message-ID: <19980604134731.D24343@perlsupport.com> p4raw-id: //depot/perl@1097
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 7a0a578e54..5958aba3f5 100644
--- a/scope.c
+++ b/scope.c
@@ -222,6 +222,9 @@ save_gp(GV *gv, I32 empty)
if (empty) {
register GP *gp;
+
+ if (GvCVu(gv))
+ sub_generation++; /* taking a method out of circulation */
Newz(602, gp, 1, GP);
GvGP(gv) = gp_ref(gp);
GvSV(gv) = NEWSV(72,0);
@@ -678,6 +681,8 @@ leave_scope(I32 base)
SvLEN(gv) = (STRLEN)SSPOPIV;
gp_free(gv);
GvGP(gv) = (GP*)ptr;
+ if (GvCVu(gv))
+ sub_generation++; /* putting a method back into circulation */
SvREFCNT_dec(gv);
break;
case SAVEt_FREESV: