summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 17:37:55 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-15 06:19:31 -0700
commitf3feca7af46a3153748b8e8b033fc84562b4b9f3 (patch)
treee312d1423cbf8daa15ff2bb0eff7c369cac0ca4b /scope.c
parent5bb151a5298022b008a5ed5db02fc631824f2670 (diff)
downloadperl-f3feca7af46a3153748b8e8b033fc84562b4b9f3.tar.gz
Turn on CVf_LEXICAL for lexical subs
This flag will signify that lexical subs should not have package names associated with them in error messages, etc.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 50036d0b78..9c8b040735 100644
--- a/scope.c
+++ b/scope.c
@@ -1042,6 +1042,7 @@ Perl_leave_scope(pTHX_ I32 base)
share_hek_hek(hek);
cv_undef((CV *)sv);
CvNAME_HEK_set(sv, hek);
+ CvLEXICAL_on(sv);
break;
}
default:
@@ -1076,6 +1077,7 @@ Perl_leave_scope(pTHX_ I32 base)
)[svp-PL_curpad],
PERL_MAGIC_proto
)->mg_obj))));
+ CvLEXICAL_on(*svp);
break;
}
default: *svp = newSV(0); break;