Skip Menu |

This queue is for tickets about the B-RecDeparse CPAN distribution.

Report information
The Basics
Id: 99177
Status: resolved
Priority: 0/
Queue: B-RecDeparse

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.09



Subject: [PATCH] Fix for 5.21.4
See attachment. This is based on blead commit 32cc5cd1d98 which fixed B::Deparse similarly.
Subject: open_skav6Kxb.txt
diff -rup B-RecDeparse-0.08-dZXKNU-orig/lib/B/RecDeparse.pm B-RecDeparse-0.08-dZXKNU/lib/B/RecDeparse.pm --- B-RecDeparse-0.08-dZXKNU-orig/lib/B/RecDeparse.pm 2013-09-01 10:18:58.000000000 -0700 +++ B-RecDeparse-0.08-dZXKNU/lib/B/RecDeparse.pm 2014-09-27 09:35:27.000000000 -0700 @@ -194,8 +194,9 @@ sub pp_gv { my $self = shift; my $gv = $self->gv_or_padgv($_[0]); - my $name = $gv->NAME; - my $cv = $gv->CV; + my $cv = $gv->FLAGS & B::SVf_ROK ? $gv->RV : 0; + my $name = $cv ? $cv->NAME_HEK || $cv->GV->NAME : $gv->NAME; + $cv ||= $gv->CV; my $seen = $self->{brd_seen}; my $body; @@ -206,7 +207,7 @@ sub pp_gv { $body = do { local @{$self}{qw<brd_sub brd_cur>} = (0, $self->{brd_cur} + 1); local $seen->{$name} = 1; - 'sub ' . $self->indent($self->deparse_sub($gv->CV)); + 'sub ' . $self->indent($self->deparse_sub($cv)); }; if (FOOL_SINGLE_DELIM) {
Thanks for your patch. This has been fixed in version 0.09. Vincent