X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCompletionDriver%2FLexEnv.pm;fp=lib%2FDevel%2FREPL%2FPlugin%2FCompletionDriver%2FLexEnv.pm;h=f346bda9d5e31bbc08be30ade53fc72a866f329e;hp=a91accaa285cee14ef5aef435dccabee91f4a133;hb=7b380d09c1f004fdca29f448531df266fc690f81;hpb=4444a83008ea2c7ab5f76f47d76766f9674c84e5 diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm index a91acca..f346bda 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm @@ -2,7 +2,13 @@ package Devel::REPL::Plugin::CompletionDriver::LexEnv; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; -requires 'lexical_environment'; +sub AFTER_PLUGIN { + my ($_REPL) = @_; + + if (!$_REPL->can('lexical_environment')) { + warn "Devel::REPL::Plugin::CompletionDriver::LexEnv requires Devel::REPL::Plugin::LexEnv."; + } +} around complete => sub { my $orig = shift;