[Bast-commits] r3759 - trunk/Devel-REPL/lib/Devel/REPL/Plugin
Sartak at dev.catalyst.perl.org
Sartak at dev.catalyst.perl.org
Fri Sep 21 01:02:13 GMT 2007
Author: Sartak
Date: 2007-09-21 01:02:12 +0100 (Fri, 21 Sep 2007)
New Revision: 3759
Modified:
trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm
Log:
Bulletproof the namespace grabbing
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm 2007-09-19 20:29:59 UTC (rev 3758)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm 2007-09-21 00:02:12 UTC (rev 3759)
@@ -54,9 +54,9 @@
my @ret = $self->$orig($line);
# the namespace of the loaded module
- if ($line =~ /use\s+(\S+)/) {
+ if ($line =~ /\buse\s+(\S+)/) {
my $module = $1;
- foreach my $keyword (keys %{$self->get_namespace($module)}) {
+ foreach my $keyword (keys %{$self->get_namespace($module) || {}}) {
$self->push_completion($keyword);
}
}
More information about the Bast-commits
mailing list