git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4412
bd8105ee-0ff8-0310-8827-fb3f25b6796d
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;