Fix tab completion of module names in the debugger
authorVincent Pit <perl@profvince.com>
Mon, 25 Jun 2012 14:07:25 +0000 (16:07 +0200)
committerVincent Pit <perl@profvince.com>
Mon, 25 Jun 2012 14:07:33 +0000 (16:07 +0200)
Also broken by 'use strict'.

lib/perl5db.pl

index d914154..4b4ab36 100644 (file)
@@ -8566,7 +8566,8 @@ start with 'main::'. Return this list.
 
     return sort map { ( $_, db_complete( $_ . "::", "V ", 2 ) ) }
       grep !/^main::/, grep /^\Q$text/,
-      map { /^(.*)::$/ ? ( $prefix . "::$1" ) : () } keys %{ $prefix . '::' }
+      map { /^(.*)::$/ ? ( $prefix . "::$1" ) : () }
+      do { no strict 'refs'; keys %{ $prefix . '::' } }
       if ( substr $line, 0, $start ) =~ /^\|*[Vm]\s+$/
       and $text =~ /^(.*[^:])::?(\w*)$/
       and $prefix = $1;