From: Jarkko Hietaniemi Date: Tue, 15 May 2001 11:55:44 +0000 (+0000) Subject: Half of #10107 got lost. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b73b7152f5f6c25feb0459a1be8f3b086ea765db;p=p5sagit%2Fp5-mst-13.2.git Half of #10107 got lost. p4raw-id: //depot/perl@10112 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 221ca22..79a005e 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';