In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6610358143bf27b3aa51a6d6d17d81fe85d7dc31?hp=f17ecf24ba6b388a06aaec154fc4ca2d828b860d>

- Log -----------------------------------------------------------------
commit 6610358143bf27b3aa51a6d6d17d81fe85d7dc31
Author: David Mitchell <[email protected]>
Date:   Thu Feb 26 11:50:19 2015 +0000

    restate -Dx dumping top-level subs
    
    Commit v5.21.3-638-g2eaf799 made compiled subs that don't have :: in their
    name be stored in stashes as refs to CVs rather than as GVs. This
    indirectly stopped perl -Dx from dumping such subs.
    
    This commit reinstates the old behaviour by making
    Perl_dump_packsubs_perl() upgrade the stash entry to a GV when it finds
    an RV->CV.
-----------------------------------------------------------------------

Summary of changes:
 dump.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dump.c b/dump.c
index 24ce93e..9587668 100644
--- a/dump.c
+++ b/dump.c
@@ -572,7 +572,10 @@ Perl_dump_packsubs_perl(pTHX_ const HV *stash, bool 
justperl)
     for (i = 0; i <= (I32) HvMAX(stash); i++) {
         const HE *entry;
        for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) {
-           const GV * const gv = (const GV *)HeVAL(entry);
+           GV * gv = (GV *)HeVAL(entry);
+            if (SvROK(gv) && SvTYPE(SvRV(gv)) == SVt_PVCV)
+                /* unfake a fake GV */
+                (void)CvGV(SvRV(gv));
            if (SvTYPE(gv) != SVt_PVGV || !GvGP(gv))
                continue;
            if (GvCVu(gv))

--
Perl5 Master Repository

Reply via email to