B::Deparse problems with japhs
Hugo van der Sanden [Tue, 16 Apr 2002 15:47:33 +0000 (16:47 +0100)]
Message-Id: <200204161447.g3GElX016515@crypt.compulink.co.uk>

p4raw-id: //depot/perl@15951

ext/B/B/Deparse.pm

index 39b38d1..b10c1fb 100644 (file)
@@ -1080,7 +1080,8 @@ sub gv_name {
 Carp::confess() if $gv->isa("B::CV");
     my $stash = $gv->STASH->NAME;
     my $name = $gv->SAFENAME;
-    if ($stash eq $self->{'curstash'} or $globalnames{$name}
+    if (($stash eq 'main' && $globalnames{$name})
+       or ($stash eq $self->{'curstash'} && !$globalnames{$name})
        or $name =~ /^[^A-Za-z_]/)
     {
        $stash = "";