New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sub calls show as gv(IV \) #15662
Comments
From @maukeCreated by @mauke$ perl -MO=Concise -e 'sub foo {} foo()' The last line shows "gv(IV \)". "IV \" is B::Concise's way of saying that Perl Info
|
From @maukeOn Sun Oct 16 07:28:46 2016, mauke- wrote:
The attached patch changes this to "gv(IV \&main::foo)" but I'm not familiar with this code. Comments? |
From @mauke0001-B-Concise-display-CVs-as-pkgname-subname-perl-129892.patchFrom 88ea550b6bec566bc7f913e0dcef3d49a54f7cb0 Mon Sep 17 00:00:00 2001
From: Lukas Mai <l.mai@web.de>
Date: Sun, 16 Oct 2016 16:28:55 +0200
Subject: [PATCH] B::Concise: display CVs as &pkgname::subname [perl #129892]
---
ext/B/B/Concise.pm | 2 ++
ext/B/t/optree_constants.t | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 315e00a..1409225 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -739,6 +739,8 @@ sub concise_sv {
$hr->{svval} .= cstring($sv->PV);
} elsif (class($sv) eq "HV") {
$hr->{svval} .= 'HASH';
+ } elsif (class($sv) eq "CV") {
+ $hr->{svval} .= '&' . $sv->GV->STASH->NAME . '::' . $sv->GV->SAFENAME;
}
$hr->{svval} = 'undef' unless defined $hr->{svval};
diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t
index 865eed1..ca98de0 100644
--- a/ext/B/t/optree_constants.t
+++ b/ext/B/t/optree_constants.t
@@ -44,8 +44,8 @@ my $want = { # expected types, how value renders in-line, todos (maybe)
myhref => [ $RV_class, '\\\\HASH'],
pi => [ 'NV', pi ],
myglob => [ $RV_class, '\\\\' ],
- mysub => [ $RV_class, '\\\\' ],
- myunsub => [ $RV_class, '\\\\' ],
+ mysub => [ $RV_class, '\\\\&main::ok' ],
+ myunsub => [ $RV_class, '\\\\&main::nosuch' ],
# these are not inlined, at least not per BC::Concise
#myyes => [ $RV_class, ],
#myno => [ $RV_class, ],
--
2.10.0
|
From @cpansproutOn Sun Oct 16 07:33:53 2016, mauke- wrote:
$sv->GV here will call CvGV internally, which will vivify the GV if there isn’t one already. It might be better to borrow some code from B::Deparse::gv_name. Maybe some of that code could be moved into B itself. This is the part I am talking about: my $cv = $gv->FLAGS & SVf_ROK ? $gv->RV : 0; -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgFixed in commit a1c09da. -zefram |
@mauke - Status changed from 'open' to 'pending release' |
From @cpansproutOn Tue, 14 Nov 2017 09:24:26 -0800, mauke- wrote:
That is one of the most annoying misfeatures of git. I have gotten into the habit of always piping my commit messages to ‘git commit -F -’ Incidentally, since I use a Mac, I copy it to the clipboard and use ‘pbpaste|git commit...’. -- Father Chrysostomos |
From @SmylersFather Chrysostomos via RT writes:
You can turn it off with: $ git config --global commit.cleanup whitespace The first says to restrict clean-up in commit messages to removing If you use that, you probably want the second as well, which says to Smylers |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#129892 (status was 'resolved')
Searchable as RT129892$
The text was updated successfully, but these errors were encountered: