summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-15 11:55:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-15 11:55:44 +0000
commitb73b7152f5f6c25feb0459a1be8f3b086ea765db (patch)
tree79e8fc96fc7d1b9a876110f102b0291ccadb7692 /ext/B
parentec5f161023cc5696391a8f74e39775a6aaaa1bbb (diff)
downloadperl-b73b7152f5f6c25feb0459a1be8f3b086ea765db.tar.gz
Half of #10107 got lost.
p4raw-id: //depot/perl@10112
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B/Deparse.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index 221ca22b07..79a005e6a3 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -3458,13 +3458,13 @@ sub re_dq {
} elsif ($type eq "concat") {
my $first = $self->re_dq($op->first, $extended);
my $last = $self->re_dq($op->last, $extended);
+
# Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]"
- if ($last =~ /^[A-Z\\\^\[\]_?]/) {
- $first =~ s/([\$@])\^$/${1}{^}/;
- }
- elsif ($last =~ /^[{\[\w]/) {
- $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/;
- }
+ ($last =~ /^[A-Z\\\^\[\]_?]/ &&
+ $first =~ s/([\$@])\^$/${1}{^}/) # "${^}W" etc
+ || ($last =~ /^[{\[\w_]/ &&
+ $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/);
+
return $first . $last;
} elsif ($type eq "uc") {
return '\U' . $self->re_dq($op->first->sibling, $extended) . '\E';