From: Adrian M. Enache Date: Sat, 29 Mar 2003 19:45:41 +0000 (+0200) Subject: Re: [perl #21744] Deparse bug: "\::" deparsed as "::" X-Git-Tag: accepted/trunk/20130322.191538~24497 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=333f3d7ae0091591bc504ee5527aec2bca5900b0;p=platform%2Fupstream%2Fperl.git Re: [perl #21744] Deparse bug: "\::" deparsed as "::" Message-ID: <20030329174541.GA8138@ratsnest.hole> p4raw-id: //depot/perl@19127 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 7b2358b..f2de6f7 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -3246,10 +3246,10 @@ sub dq { my $first = $self->dq($op->first); my $last = $self->dq($op->last); - # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]" + # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]", "$foo\::bar" ($last =~ /^[A-Z\\\^\[\]_?]/ && $first =~ s/([\$@])\^$/${1}{^}/) # "${^}W" etc - || ($last =~ /^[{\[\w_]/ && + || ($last =~ /^[:'{\[\w_]/ && $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/); return $first . $last;