3 package Devel::REPL::Plugin::CompletionDriver::Turtles;
4 use Devel::REPL::Plugin;
6 use namespace::clean -except => [ "meta" ];
8 around complete => sub {
10 my ($self, $text, $document) = @_;
12 my $prefix = $self->default_command_prefix;
13 my $line_re = qr/^($prefix)(\w+)/;
15 my @orig = $self->$orig($text, $document);
17 if ( my ( $pre, $method ) = ( $text =~ $line_re ) ) {
18 my $filter = qr/^\Q$method/;
23 grep { $_ =~ $filter }
24 map { /^expr?_command_(\w+)/ ? $1 : () }
26 $self->meta->compute_all_applicable_methods
40 Devel::REPL::Plugin::CompletionDriver::Turtles - Complete Turtles-based commands
44 Yuval Kogman E<lt>nothingmuch@woobling.orgE<gt>