[Bast-commits] r4406 - trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver

Sartak at dev.catalyst.perl.org Sartak at dev.catalyst.perl.org
Mon May 26 03:51:44 BST 2008


Author: Sartak
Date: 2008-05-26 03:51:44 +0100 (Mon, 26 May 2008)
New Revision: 4406

Modified:
   trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
Log:
Use requires lexical_environment instead of manually checking in AFTER_PLUGIN


Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm	2008-05-25 20:50:57 UTC (rev 4405)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm	2008-05-26 02:51:44 UTC (rev 4406)
@@ -2,14 +2,8 @@
 use Devel::REPL::Plugin;
 use namespace::clean -except => [ 'meta' ];
 
-sub AFTER_PLUGIN {
-  my ($_REPL) = @_;
+requires 'lexical_environment';
 
-  if (!$_REPL->can('lexical_environment')) {
-    warn "Devel::REPL::Plugin::CompletionDriver::LexEnv requires Devel::REPL::Plugin::LexEnv.";
-  }
-}
-
 around complete => sub {
   my $orig = shift;
   my ($self, $text, $document) = @_;




More information about the Bast-commits mailing list