From 333f3d7ae0091591bc504ee5527aec2bca5900b0 Mon Sep 17 00:00:00 2001 From: "Adrian M. Enache" Date: Sat, 29 Mar 2003 21:45:41 +0200 Subject: [PATCH] Re: [perl #21744] Deparse bug: "\::" deparsed as "::" Message-ID: <20030329174541.GA8138@ratsnest.hole> p4raw-id: //depot/perl@19127 --- ext/B/B/Deparse.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.7.4