This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
expand comment in Perl_pad_tidy
authorDavid Mitchell <davem@iabyn.com>
Fri, 11 Jan 2013 15:04:47 +0000 (15:04 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 11 Jan 2013 15:06:40 +0000 (15:06 +0000)
make it clear that /$var/ is only eval-able in the presence of
'use re eval'; then generally tidy and reformat the comment.

pad.c

diff --git a/pad.c b/pad.c
index 549d3f5..70519e4 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1714,13 +1714,21 @@ Perl_pad_tidy(pTHX_ padtidy_type type)
 
     ASSERT_CURPAD_ACTIVE("pad_tidy");
 
 
     ASSERT_CURPAD_ACTIVE("pad_tidy");
 
-    /* If this CV has had any 'eval-capable' ops planted in it
-     * (ie it contains eval '...', //ee, /$var/ or /(?{..})/), Then any
-     * anon prototypes in the chain of CVs should be marked as cloneable,
-     * so that for example the eval's CV in C<< sub { eval '$x' } >> gets
-     * the right CvOUTSIDE.
-     * If running with -d, *any* sub may potentially have an eval
-     * executed within it.
+    /* If this CV has had any 'eval-capable' ops planted in it:
+     * i.e. it contains any of:
+     *
+     *     * eval '...',
+     *     * //ee,
+     *     * use re 'eval'; /$var/
+     *     * /(?{..})/),
+     *
+     * Then any anon prototypes in the chain of CVs should be marked as
+     * cloneable, so that for example the eval's CV in
+     *
+     *    sub { eval '$x' }
+     *
+     * gets the right CvOUTSIDE.  If running with -d, *any* sub may
+     * potentially have an eval executed within it.
      */
 
     if (PL_cv_has_eval || PL_perldb) {
      */
 
     if (PL_cv_has_eval || PL_perldb) {