X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCompletionDriver%2FMethods.pm;h=fa854bdf5cad453c221531dc9b982899c38040c1;hb=7403333dae2210dc9235882e4178349129461ed1;hp=4566b51946e9bc297de325cfa858b742b46cd21d;hpb=6631e15ccd2313ff350fd9bfa44c1ccdbac77100;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm index 4566b51..fa854bd 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm @@ -1,11 +1,15 @@ +use strict; +use warnings; package Devel::REPL::Plugin::CompletionDriver::Methods; use Devel::REPL::Plugin; -use namespace::clean -except => [ 'meta' ]; +use namespace::autoclean; -with qw( - Devel::REPL::Plugin::Completion - Devel::REPL::Plugin::FindVariable -); +sub BEFORE_PLUGIN { + my $self = shift; + for (qw/Completion FindVariable/) { + $self->load_plugin($_); + } +} around complete => sub { my $orig = shift; @@ -55,8 +59,8 @@ around complete => sub { return $orig->(@_), grep { $_ =~ $re } - map { $_->{name} } - $metaclass->compute_all_applicable_methods; + map { $_->name } + $metaclass->get_all_methods; }; 1;