From: Rafael Garcia-Suarez Date: Mon, 11 Aug 2003 18:33:06 +0000 (+0000) Subject: [perl #23274] B::Deparse wasn't handling correctly builtins that X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b72c97e8d47870b635328f30b227f57d2bb55515;p=p5sagit%2Fp5-mst-13.2.git [perl #23274] B::Deparse wasn't handling correctly builtins that have two filehandles in their prototypes (pipe, socketpair, accept) when non-bareword prototypes were used. p4raw-id: //depot/perl@20622 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index fe820b6..4d83331 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -2129,8 +2129,9 @@ sub listop { return $name if null $kid; my $first; $name = "socketpair" if $name eq "sockpair"; - if (defined prototype("CORE::$name") - && prototype("CORE::$name") =~ /^;?\*/ + my $proto = prototype("CORE::$name"); + if (defined $proto + && $proto =~ /^;?\*/ && $kid->name eq "rv2gv") { $first = $self->deparse($kid->first, 6); } @@ -2143,6 +2144,10 @@ sub listop { $first = "+$first" if not $parens and substr($first, 0, 1) eq "("; push @exprs, $first; $kid = $kid->sibling; + if ($proto =~ /^\*\*/ && $kid->name eq "rv2gv") { + push @exprs, $self->deparse($kid->first, 6); + $kid = $kid->sibling; + } for (; !null($kid); $kid = $kid->sibling) { push @exprs, $self->deparse($kid, 6); }