[Bast-commits] r4412 -
trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver
Sartak at dev.catalyst.perl.org
Sartak at dev.catalyst.perl.org
Mon May 26 04:47:44 BST 2008
Author: Sartak
Date: 2008-05-26 04:47:44 +0100 (Mon, 26 May 2008)
New Revision: 4412
Modified:
trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm
Log:
Tweaks to complete package names and variables
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm 2008-05-26 03:22:06 UTC (rev 4411)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm 2008-05-26 03:47:44 UTC (rev 4412)
@@ -9,9 +9,10 @@
my $last = $self->last_ppi_element($document);
return $orig->(@_)
- unless $last->isa('PPI::Token::Symbol');
+ unless $last->isa('PPI::Token::Symbol')
+ || $last->isa('PPI::Token::Word');
- my $sigil = substr($last, 0, 1, '');
+ my $sigil = $last =~ s/^[\$\@\%\&\*]// ? $1 : undef;
my $re = qr/^\Q$last/;
my @package_fragments = split qr/::|'/, $last;
More information about the Bast-commits
mailing list