This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B::Deparse should call B::threadsv_names, instead of hard coding a list.
authorNicholas Clark <nick@ccl4.org>
Wed, 27 Oct 2010 20:14:06 +0000 (22:14 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 27 Oct 2010 20:14:06 +0000 (22:14 +0200)
These are only used under 5.005threads, which was removed in 5.10.

dist/B-Deparse/Deparse.pm
dist/B-Deparse/t/deparse.t

index 609a1c7..89d6277 100644 (file)
@@ -2851,15 +2851,7 @@ sub pp_padsv {
 sub pp_padav { pp_padsv(@_) }
 sub pp_padhv { pp_padsv(@_) }
 
-my @threadsv_names;
-
-BEGIN {
-    @threadsv_names = ("_", "1", "2", "3", "4", "5", "6", "7", "8", "9",
-                      "&", "`", "'", "+", "/", ".", ",", "\\", '"', ";",
-                      "^", "-", "%", "=", "|", "~", ":", "^A", "^E",
-                      "!", "@");
-}
-
+my @threadsv_names = B::threadsv_names;
 sub pp_threadsv {
     my $self = shift;
     my($op, $cx) = @_;
index 4b94d4a..c53ce8d 100644 (file)
@@ -17,7 +17,7 @@ BEGIN {
     require feature;
     feature->import(':5.10');
 }
-use Test::More tests => 91;
+use Test::More tests => 92;
 use Config ();
 
 use B::Deparse;
@@ -667,3 +667,8 @@ pop @_;
 'foo' =~ ($_ =~ /foo/);
 'foo' =~ ($_ =~ tr/fo//);
 'foo' =~ ($_ =~ s/foo//);
+####
+# Test @threadsv_names under 5005threads
+foreach $' (1, 2) {
+    sleep $';
+}