summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-06-29 22:16:22 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-06-29 22:20:13 -0700
commit1b5aaca661f906a9b324afb51b7af8727497f276 (patch)
tree4765a1bf5cc13b7702bc3f83d249959d65d10a50 /pad.c
parent1c2b3fd6f10f07e101845ead8e14f613c1b487de (diff)
downloadperl-1b5aaca661f906a9b324afb51b7af8727497f276.tar.gz
pad.c: Update comments
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pad.c b/pad.c
index 1870ab6e7c..c569e18706 100644
--- a/pad.c
+++ b/pad.c
@@ -1923,10 +1923,12 @@ Perl_cv_clone(pTHX_ CV *proto)
assert(!CvUNIQUE(proto));
- /* Since cloneable anon subs can be nested, CvOUTSIDE may point
+ /* Anonymous subs have a weak CvOUTSIDE pointer, so its value is not
+ * reliable. The currently-running sub is always the one we need to
+ * close over.
+ * Note that in general for formats, CvOUTSIDE != find_runcv.
+ * Since formats may be nested inside closures, CvOUTSIDE may point
* to a prototype; we instead want the cloned parent who called us.
- * Note that in general for formats, CvOUTSIDE != find_runcv; formats
- * inside closures, however, only work if CvOUTSIDE == find_runcv.
*/
if (SvTYPE(proto) == SVt_PVCV)