From e0ab66ad951f554456c7845a38622f655a76bd5b Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 27 Oct 2010 22:14:06 +0200 Subject: [PATCH] B::Deparse should call B::threadsv_names, instead of hard coding a list. These are only used under 5.005threads, which was removed in 5.10. --- dist/B-Deparse/Deparse.pm | 10 +--------- dist/B-Deparse/t/deparse.t | 7 ++++++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index 609a1c7..89d6277 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -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) = @_; diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index 4b94d4a..c53ce8d 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -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 $'; +} -- 2.7.4