Change 20622 by [EMAIL PROTECTED] on 2003/08/11 18:33:06

        [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.

Affected files ...

... //depot/perl/ext/B/B/Deparse.pm#136 edit

Differences ...

==== //depot/perl/ext/B/B/Deparse.pm#136 (text) ====
Index: perl/ext/B/B/Deparse.pm
--- perl/ext/B/B/Deparse.pm#135~20287~  Tue Jul 29 01:26:48 2003
+++ perl/ext/B/B/Deparse.pm     Mon Aug 11 11:33:06 2003
@@ -2129,8 +2129,9 @@
     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 @@
     $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);
     }
End of Patch.

Reply via email to