[Bast-commits] r4407 -
trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver
Sartak at dev.catalyst.perl.org
Sartak at dev.catalyst.perl.org
Mon May 26 03:54:10 BST 2008
Author: Sartak
Date: 2008-05-26 03:54:10 +0100 (Mon, 26 May 2008)
New Revision: 4407
Modified:
trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
Log:
Back out previous change. requires doesn't work for attributes. arg
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm 2008-05-26 02:51:44 UTC (rev 4406)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm 2008-05-26 02:54:10 UTC (rev 4407)
@@ -2,8 +2,14 @@
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;
my ($self, $text, $document) = @_;
More information about the Bast-commits
mailing list