Skip to content

Commit 8c2e27d

Browse files
author
Father Chrysostomos
committed
Deparse $#{1} with braces
$#1 is a syntax error.
1 parent b73697b commit 8c2e27d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/B/Deparse.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ sub stash_variable {
16701670
return "$prefix$name";
16711671
}
16721672

1673-
if ($name =~ /^[^\w+-]$/) {
1673+
if ($name =~ /^[^[:alpha:]+-]$/) {
16741674
if (defined $cx && $cx == 26) {
16751675
if ($prefix eq '@') {
16761676
return "$prefix\{$name}";

lib/B/Deparse.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ my @x;
14651465
@x = ($#{`}, $#{~}, $#{!}, $#{@}, $#{$}, $#{%}, $#{^}, $#{&}, $#{*});
14661466
@x = ($#{(}, $#{)}, $#{[}, $#{{}, $#{]}, $#{}}, $#{'}, $#{"}, $#{,});
14671467
@x = ($#{<}, $#{.}, $#{>}, $#{/}, $#{?}, $#{=}, $#+, $#{\}, $#{|}, $#-);
1468-
@x = ($#{;}, $#{:});
1468+
@x = ($#{;}, $#{:}, $#{1});
14691469
####
14701470
# ${#} interpolated
14711471
# It's a known TODO that warnings are deparsed as bits, not textually.

0 commit comments

Comments
 (0)