1 package Devel::REPL::Plugin::CompletionDriver::Keywords;
2 use Devel::REPL::Plugin;
3 use B::Keywords qw/@Functions @Barewords/;
4 use namespace::clean -except => [ 'meta' ];
6 around complete => sub {
8 my ($self, $text, $document) = @_;
10 my $last = $self->last_ppi_element($document);
13 unless $last->isa('PPI::Token::Word');
15 my $re = qr/^\Q$last/;
18 grep { $_ =~ $re } @Functions, @Barewords;