In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7a388d0f142e3d8b43db79e3c5bf5a9a8e39e355?hp=607733213512652a8c98b3055264d6baf5019eb5>

- Log -----------------------------------------------------------------
commit 7a388d0f142e3d8b43db79e3c5bf5a9a8e39e355
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 8 22:22:30 2017 -0700

    Fix B::Xref to handle sub refs
    
    This only applies to non-threaded builds.  Threaded builds were
    already fine.
-----------------------------------------------------------------------

Summary of changes:
 ext/B/B/Xref.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ext/B/B/Xref.pm b/ext/B/B/Xref.pm
index 255ee890bd..a4b8b2a563 100644
--- a/ext/B/B/Xref.pm
+++ b/ext/B/B/Xref.pm
@@ -143,7 +143,7 @@ Malcolm Beattie, mbeat...@sable.ox.ac.uk.
 use strict;
 use Config;
 use B qw(peekop class comppadlist main_start svref_2object walksymtable
-         OPpLVAL_INTRO SVf_POK OPpOUR_INTRO cstring
+         OPpLVAL_INTRO SVf_POK SVf_ROK OPpOUR_INTRO cstring
         );
 
 sub UNKNOWN { ["?", "?", "?"] }
@@ -331,7 +331,13 @@ sub pp_gv {
     }
     else {
        $gv = $op->gv;
-       $top = [$gv->STASH->NAME, "*", $gv->SAFENAME];
+       if ($gv->FLAGS & SVf_ROK) { # sub ref
+           my $cv = $gv->RV;
+           $top = [$cv->STASH->NAME, '*', B::safename($cv->NAME_HEK)]
+       }
+       else {
+           $top = [$gv->STASH->NAME, '*', $gv->SAFENAME];
+       }
     }
     process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used");
 }

--
Perl5 Master Repository

Reply via email to