From: Sartak Date: Sat, 31 May 2008 16:17:39 +0000 (+0000) Subject: r61340@onn: sartak | 2008-05-31 12:17:19 -0400 X-Git-Tag: v1.003015~91 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6631e15ccd2313ff350fd9bfa44c1ccdbac77100;p=p5sagit%2FDevel-REPL.git r61340@onn: sartak | 2008-05-31 12:17:19 -0400 Have the completion driver plugins load Completion Have LexEnv completion driver load LexEnv instead of bitching about its absence git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4444 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm index 0671f08..a8b42a9 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm @@ -2,6 +2,10 @@ package Devel::REPL::Plugin::CompletionDriver::Globals; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; +with qw( + Devel::REPL::Plugin::Completion +); + around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm b/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm index ace936f..d1aa4b3 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm @@ -4,6 +4,10 @@ use File::Next; use File::Spec; use namespace::clean -except => [ 'meta' ]; +with qw( + Devel::REPL::Plugin::Completion +); + around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm index 83c191b..decc6c8 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm @@ -3,6 +3,10 @@ use Devel::REPL::Plugin; use B::Keywords qw/@Functions @Barewords/; use namespace::clean -except => [ 'meta' ]; +with qw( + Devel::REPL::Plugin::Completion +); + around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm index 44de708..cd3ba0b 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm @@ -2,13 +2,10 @@ package Devel::REPL::Plugin::CompletionDriver::LexEnv; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; -sub AFTER_PLUGIN { - my ($_REPL) = @_; - - if (!$_REPL->can('lexical_environment')) { - warn "Devel::REPL::Plugin::CompletionDriver::LexEnv requires Devel::REPL::Plugin::LexEnv."; - } -} +with qw( + Devel::REPL::Plugin::Completion + Devel::REPL::Plugin::LexEnv +); around complete => sub { my $orig = shift; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm index 4fa2292..4566b51 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm @@ -2,7 +2,10 @@ package Devel::REPL::Plugin::CompletionDriver::Methods; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; -with 'Devel::REPL::Plugin::FindVariable'; +with qw( + Devel::REPL::Plugin::Completion + Devel::REPL::Plugin::FindVariable +); around complete => sub { my $orig = shift;