From: Sartak Date: Fri, 21 Sep 2007 05:35:25 +0000 (+0000) Subject: grep /^${var}$/ is a little silly, just use $_ eq $var X-Git-Tag: v1.003015~149 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=33628ecb3689f2719563d0a9ae82d3ccec1a4cbb;p=p5sagit%2FDevel-REPL.git grep /^${var}$/ is a little silly, just use $_ eq $var git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3766 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/Completion.pm b/lib/Devel/REPL/Plugin/Completion.pm index 852e866..ad7c25f 100644 --- a/lib/Devel/REPL/Plugin/Completion.pm +++ b/lib/Devel/REPL/Plugin/Completion.pm @@ -67,7 +67,7 @@ around 'eval' => sub { 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;