diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-08-28 17:37:55 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-15 06:19:31 -0700 |
commit | f3feca7af46a3153748b8e8b033fc84562b4b9f3 (patch) | |
tree | e312d1423cbf8daa15ff2bb0eff7c369cac0ca4b /pad.c | |
parent | 5bb151a5298022b008a5ed5db02fc631824f2670 (diff) | |
download | perl-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 'pad.c')
-rw-r--r-- | pad.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -469,9 +469,10 @@ Perl_cv_undef(pTHX_ CV *cv) CvXSUB(cv) = NULL; } /* delete all flags except WEAKOUTSIDE and CVGV_RC, which indicate the - * ref status of CvOUTSIDE and CvGV, and ANON, which pp_entersub uses + * ref status of CvOUTSIDE and CvGV, and ANON and + * LEXICAL, which pp_entersub uses * to choose an error message */ - CvFLAGS(cv) &= (CVf_WEAKOUTSIDE|CVf_CVGV_RC|CVf_ANON); + CvFLAGS(cv) &= (CVf_WEAKOUTSIDE|CVf_CVGV_RC|CVf_ANON|CVf_LEXICAL); } /* @@ -2086,6 +2087,7 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, bool newcv) assert(SvTYPE(ppad[ix]) == SVt_PVCV); subclones = 1; sv = newSV_type(SVt_PVCV); + CvLEXICAL_on(sv); } else if (PadnameLEN(namesv)>1 && !PadnameIsOUR(namesv)) { @@ -2104,6 +2106,7 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, bool newcv) * (SvUTF8(namesv) ? -1 : 1), hash) ); + CvLEXICAL_on(sv); } else sv = SvREFCNT_inc(ppad[ix]); else if (sigil == '@') |