From: Sartak Date: Mon, 26 May 2008 02:51:44 +0000 (+0000) Subject: Use requires lexical_environment instead of manually checking in AFTER_PLUGIN X-Git-Tag: v1.003015~103 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=commitdiff_plain;h=4444a83008ea2c7ab5f76f47d76766f9674c84e5;hp=873d8203272a4fc329d5ec1f17d52f67a2993ebb Use requires lexical_environment instead of manually checking in AFTER_PLUGIN git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4406 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm index f346bda..a91acca 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm @@ -2,13 +2,7 @@ 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."; - } -} +requires 'lexical_environment'; around complete => sub { my $orig = shift;