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 generated code affected by use vars? #16238
Comments
From @toddrCreated by @toddrI discovered that the removal of 'use vars' from B::Deparse affects Perl Info
|
From @toddr0001-Remove-use-vars-from-B-Deparse.patchFrom 7a0d115e87d52694a2eb0b5de6406b55f91762b9 Mon Sep 17 00:00:00 2001
From: Todd Rinaldo <toddr@cpan.org>
Date: Fri, 10 Nov 2017 23:01:27 -0600
Subject: [PATCH] Remove use vars from B::Deparse
---
lib/B/Deparse.pm | 2 +-
lib/B/Deparse.t | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 7609d638ee..71fd4a7d3a 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -53,7 +53,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
$VERSION = '1.45';
use strict;
-use vars qw/$AUTOLOAD/;
+our $AUTOLOAD;
use warnings ();
require feature;
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index d94d7f61da..833f0a7853 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -1996,7 +1996,7 @@ no warnings "experimental::lexical_subs";
my sub f {}
print f();
>>>>
-BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x54\x55\x55\x55"}
+BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x54\x55\x55\x15"}
my sub f {
}
@@ -2009,7 +2009,7 @@ no warnings 'experimental::lexical_subs';
state sub f {}
print f();
>>>>
-BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x54\x55\x55\x55"}
+BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x54\x55\x55\x15"}
state sub f {
}
--
2.15.0
|
From @toddr
It looks like this bit is coming from warnings::register as called from use vars, which means it's desirable to remove use vars from B::Deparse. BEFORE: $>perl -E'use warnings::register; use warnings; BEGIN { printf("%x", AFTER: $>perl -E'use warnings; BEGIN { printf("%x", |
@toddr - Status changed from 'new' to 'pending release' |
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#132429 (status was 'resolved')
Searchable as RT132429$
The text was updated successfully, but these errors were encountered: