[Bast-commits] r3766 - trunk/Devel-REPL/lib/Devel/REPL/Plugin

Sartak at dev.catalyst.perl.org Sartak at dev.catalyst.perl.org
Fri Sep 21 06:35:27 GMT 2007


Author: Sartak
Date: 2007-09-21 06:35:25 +0100 (Fri, 21 Sep 2007)
New Revision: 3766

Modified:
   trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm
Log:
grep /^${var}$/ is a little silly, just use $_ eq $var


Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm	2007-09-21 04:07:48 UTC (rev 3765)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/Completion.pm	2007-09-21 05:35:25 UTC (rev 3766)
@@ -67,7 +67,7 @@
     foreach my $var (keys %{$lex->get_context('_')}) {
         $var = substr($var, 1); # we drop the variable idiom as it confuses the completion
         $self->push_completion($var) unless 
-            grep /^${var}$/, @{$self->term->Attribs->{completion_word}};
+            grep $_ eq $var, @{$self->term->Attribs->{completion_word}};
     }
 
     return @ret;




More information about the Bast-commits mailing list