diff options
author | Robin Houston <robin@cpan.org> | 2001-05-14 23:10:07 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-15 02:01:24 +0000 |
commit | 44c6d2a19e4f4884d18ee1c0ea9d0d8e8eec68b5 (patch) | |
tree | 62f1de90934284a2c5a181c95d135a62eba50ef4 /ext/B | |
parent | 12aa154540b3c1c56d15cc92a5128a812c4e29ae (diff) | |
download | perl-44c6d2a19e4f4884d18ee1c0ea9d0d8e8eec68b5.tar.gz |
"${foo}_bar"
Message-ID: <20010514221007.A21118@penderel>
p4raw-id: //depot/perl@10107
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/B/Deparse.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 19e9451286..89b1002374 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -3114,13 +3114,13 @@ sub dq { } elsif ($type eq "concat") { my $first = $self->dq($op->first); my $last = $self->dq($op->last); - # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]" - if ($last =~ /^[A-Z\\\^\[\]_?]/) { - $first =~ s/([\$@])\^$/${1}{^}/; # "${^}W" etc - } - elsif ($last =~ /^[{\[\w]/) { - $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/; - } + + # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]" + ($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->dq($op->first->sibling) . '\E'; |