diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-12 22:42:11 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-12 22:42:11 -0800 |
commit | 8c2e27d21b5d476a55809ff18e76be4c43cb8551 (patch) | |
tree | 30a0f5e0966c1688cbd9cd12beb6ca3666eda45c /lib | |
parent | b73697b099862a735e841ec18d19ed8f0debd455 (diff) | |
download | perl-8c2e27d21b5d476a55809ff18e76be4c43cb8551.tar.gz |
Deparse $#{1} with braces
$#1 is a syntax error.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/B/Deparse.pm | 2 | ||||
-rw-r--r-- | lib/B/Deparse.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index 1ab8472c60..9a8ad2bc95 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -1670,7 +1670,7 @@ sub stash_variable { return "$prefix$name"; } - if ($name =~ /^[^\w+-]$/) { + if ($name =~ /^[^[:alpha:]+-]$/) { if (defined $cx && $cx == 26) { if ($prefix eq '@') { return "$prefix\{$name}"; diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t index 082d3a1c78..8d52e90cbd 100644 --- a/lib/B/Deparse.t +++ b/lib/B/Deparse.t @@ -1465,7 +1465,7 @@ my @x; @x = ($#{`}, $#{~}, $#{!}, $#{@}, $#{$}, $#{%}, $#{^}, $#{&}, $#{*}); @x = ($#{(}, $#{)}, $#{[}, $#{{}, $#{]}, $#{}}, $#{'}, $#{"}, $#{,}); @x = ($#{<}, $#{.}, $#{>}, $#{/}, $#{?}, $#{=}, $#+, $#{\}, $#{|}, $#-); -@x = ($#{;}, $#{:}); +@x = ($#{;}, $#{:}, $#{1}); #### # ${#} interpolated # It's a known TODO that warnings are deparsed as bits, not textually. |