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
B::Deparse::maybe_qualify(): uninitialized value warning #12152
Comments
From @jkeenanCreated by @jkeenanFrom time-to-time I run coverage analysis on the Parrot virtual t/configure/033-step.t ...................... 1/34 Use of uninitialized Here is the relevant section of B::Deparse: 1333 sub maybe_qualify { If $prefix comes into the subroutine undefined, it will still be 1292 sub stash_variable { and: 1319 sub stash_variable_name { Either stash_variable() or stash_variable_name() is invoked 2499 sub rv2gv_or_string { This suggests at least two possible approaches to a fix: (1) Change the first argument to stash_variable_name() at line (2) After line 1320 in stash_variable_name(), say something $prefix //= ''; (Hey, that's the first time I've ever had the opportunity to use How should we proceed? Thank you very much. Perl Info
|
From chromatic@wgz.orgOn Friday, June 01, 2012 04:00:31 PM James E Keenan wrote:
Is this running under 'make test'?
Given that B::Deparse has on line 26 in my 5.16 installation: use warnings (); ... perhaps this is really a bug in Test::Harness, which somewhere in its guts (Some might argue there's a bug in warnings.pm that this empty import list -- c |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Fri Jun 01 16:19:23 2012, chromatic@wgz.org wrote:
Here's the guts of the program I'm using: PERL5OPT=-MDevel::Cover=-db,$COVERAGEDIR/ \ It's the same program I've used for years. I usually run it in a screen |
From chromatic@wgz.orgOn Friday, June 01, 2012 04:40:30 PM James E Keenan via RT wrote:
Parrot's Configure.pl eventually calls something which uses Test::Harness. -- c |
From @jkeenanOn 6/1/12 10:15 PM, chromatic wrote:
But it doesn't bother me that running my program throws warnings. For jimk |
From @nwc10On Fri, Jun 01, 2012 at 04:18:46PM -0700, chromatic wrote:
What is that code intending by this? BEGIN { Surely that's a no-op within the scope of Deparse.pm, as all it does is load
That's going to be tricky, isn't it? Because C<use foo ();> doesn't even call Nicholas Clark |
From @pjcjOn Fri, Jun 01, 2012 at 10:43:06PM -0400, James E Keenan wrote:
It is the enabling of warnings which is the specific reason that these $ perl -MDevel::Cover -e 'open "open"' with $ perl -w -MDevel::Cover -e 'open "open"' But I haven't looked into exactly what is turning on the warnings in The warning is indeed new in 5.16.0. It came into being with be6cf5c There are at least two things which can be done here. First, changing Secondly, I can insulate Devel::Cover against this by explicitly turning There is another uninitialized warning shown by There are probably others not shown by the tests. I have provided For many years I've wanted to split B::Deparse into its two logical -- |
From @pjcjperl113464.patchcommit a52451d8c9cd8ffae49eb56535d6ac6dba04f18b
Author: Paul Johnson <paul@pjcj.net>
Date: Sat Jun 2 14:44:47 2012 +0200
Quieten B::Deparse warnings (fixes #113464).
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm
index 46af5e4..debbf6a 100644
--- a/dist/B-Deparse/Deparse.pm
+++ b/dist/B-Deparse/Deparse.pm
@@ -2500,7 +2500,7 @@ sub rv2gv_or_string {
my($self,$op) = @_;
if ($op->name eq "gv") { # could be open("open") or open("###")
my($name,$quoted) =
- $self->stash_variable_name(undef,$self->gv_or_padgv($op));
+ $self->stash_variable_name("", $self->gv_or_padgv($op));
$quoted ? $name : "*$name";
}
else {
|
From @doyOn Sat, Jun 02, 2012 at 03:07:24PM +0200, Paul Johnson wrote:
Test::Harness forcibly runs everything with -w: I believe people have been talking with andya to get this fixed, because -doy |
From @rjbs* Jesse Luehrs <doy@tozt.net> [2012-06-02T12:35:59]
A few of us demonstrated this behavior to Andy about a month ago and he agreed Perl-Toolchain-Gang/Test-Harness@18794a8 ...it just hasn't been released yet. -- |
From @jkeenanOn Sun Jun 03 06:32:05 2012, perl.p5p@rjbs.manxome.org wrote:
Okay, that should permit us to re-focus the discussion in this RT back rjbs: Do you have thoughts about how we should approach this? Thank you very much. |
From @jkeenanOn Sat Jun 02 06:08:02 2012, paul@pjcj.net wrote:
I have tested this patch against blead and can confirm that all tests Jim Keenan |
From @cpansproutOn Sat Jun 02 03:33:13 2012, nicholas wrote:
I’m pretty certain that is *exactly* what the author intended. Later on { -- Father Chrysostomos |
From @cpansproutOn Sat Jun 02 06:08:02 2012, paul@pjcj.net wrote:
That patch looks good. I have applied it as 1db94ee. Thank you.
It wouldn’t hurt to make it warning-safe, but, for me, it’s really not -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#113464 (status was 'resolved')
Searchable as RT113464$
The text was updated successfully, but these errors were encountered: