projects
/
p5sagit/Devel-REPL.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Split symbol name instead of munging it in-place
[p5sagit/Devel-REPL.git]
/
lib
/
Devel
/
REPL
/
Plugin
/
CompletionDriver
/
LexEnv.pm
diff --git
a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
index
133baaf
..
827efb9
100644
(file)
--- a/
lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
+++ b/
lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
@@
-16,8
+16,8
@@
around complete => sub {
return $orig->(@_)
unless $last->isa('PPI::Token::Symbol');
- my $sigil = substr($last, 0, 1, '');
- my $re = qr/^\Q$last/;
+ my ($sigil, $name) = split(//, $last, 2);
+ my $re = qr/^\Q$name/;
return $orig->(@_),
# ReadLine is weirdly inconsistent