summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Houston <robin@cpan.org>2001-05-14 23:10:07 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-15 02:01:24 +0000
commit44c6d2a19e4f4884d18ee1c0ea9d0d8e8eec68b5 (patch)
tree62f1de90934284a2c5a181c95d135a62eba50ef4
parent12aa154540b3c1c56d15cc92a5128a812c4e29ae (diff)
downloadperl-44c6d2a19e4f4884d18ee1c0ea9d0d8e8eec68b5.tar.gz
"${foo}_bar"
Message-ID: <20010514221007.A21118@penderel> p4raw-id: //depot/perl@10107
-rw-r--r--ext/B/B/Deparse.pm14
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';