summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-23 20:29:13 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 16:51:34 -0700
commit09fb282d08ec6c0189a10f94933ae9c8b8186577 (patch)
treef14564b5856183a9cc59a306dd19105ec808ef9d /pad.c
parente33525913afb6ff03f7a9e1f9881fd5ea6982f22 (diff)
downloadperl-09fb282d08ec6c0189a10f94933ae9c8b8186577.tar.gz
Copy call checker when cloning closure prototype
Otherwise cv_set_call_checker has no effect inside an attribute han- dler for a closure.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pad.c b/pad.c
index c4362af0d4..3b8cac2203 100644
--- a/pad.c
+++ b/pad.c
@@ -1912,6 +1912,8 @@ Perl_cv_clone(pTHX_ CV *proto)
if (SvPOK(proto))
sv_setpvn(MUTABLE_SV(cv), SvPVX_const(proto), SvCUR(proto));
+ if (SvMAGIC(proto))
+ mg_copy((SV *)proto, (SV *)cv, 0, 0);
CvPADLIST(cv) = pad_new(padnew_CLONE|padnew_SAVE);