diff options
author | Gerard Goossen <gerard@ggoossen.net> | 2009-12-27 18:02:37 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-01-10 23:50:36 +0100 |
commit | eac910c876359d864e67b412fa2d9f03b5ba8a0b (patch) | |
tree | 096ce89b99906b319e224b554dd62c3b5dd1b0ad /op.c | |
parent | 885ef6f56b61fd750ef3b1fa614d11480baac635 (diff) | |
download | perl-eac910c876359d864e67b412fa2d9f03b5ba8a0b.tar.gz |
Retain builtin attributes from pre-declaration. Fixes [perl #68758].
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5785,8 +5785,9 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) && block->op_type != OP_NULL #endif ) { + cv_flags_t existing_builtin_attrs = CvFLAGS(cv) & CVf_BUILTIN_ATTRS; cv_undef(cv); - CvFLAGS(cv) = CvFLAGS(PL_compcv); + CvFLAGS(cv) = CvFLAGS(PL_compcv) | existing_builtin_attrs; if (!CvWEAKOUTSIDE(cv)) SvREFCNT_dec(CvOUTSIDE(cv)); CvOUTSIDE(cv) = CvOUTSIDE(PL_compcv); |