diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-27 23:03:36 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-27 23:24:03 -0700 |
commit | d37427bce6f3a7163805f4a86194bcfabaf0e2c0 (patch) | |
tree | 17b4b2361c93e72f9aee4e5caa927fb4b668b4b1 /cop.h | |
parent | 19bcb54e626c56999bd22347f278ae81abf0eb1c (diff) | |
download | perl-d37427bce6f3a7163805f4a86194bcfabaf0e2c0.tar.gz |
Stop here-docs from gutting (caller $n)[6]
(caller $n)[6] returns the text of the eval. Actually, it would
return, not the text of the eval, but the text with all the here-doc
bodies missing.
In this commit, I’m abusing the SvSCREAM flag to indicate that the
eval text stored in the context stack is refcounted.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -717,6 +717,8 @@ struct block_eval { PL_in_eval = CxOLD_IN_EVAL(cx); \ optype = CxOLD_OP_TYPE(cx); \ PL_eval_root = cx->blk_eval.old_eval_root; \ + if (cx->blk_eval.cur_text && SvSCREAM(cx->blk_eval.cur_text)) \ + SvREFCNT_dec(cx->blk_eval.cur_text); \ if (cx->blk_eval.old_namesv) \ sv_2mortal(cx->blk_eval.old_namesv); \ } STMT_END |