From: Sartak Date: Mon, 2 Jun 2008 20:02:05 +0000 (+0000) Subject: r61423@onn: sartak | 2008-06-02 16:00:33 -0400 X-Git-Tag: v1.003015~87 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a40071593734bf02e987a076b6408095ecfad41;p=p5sagit%2FDevel-REPL.git r61423@onn: sartak | 2008-06-02 16:00:33 -0400 Use "BEFORE_PLUGIN { load_plugin }" instead of "with" git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4457 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/B/Concise.pm b/lib/Devel/REPL/Plugin/B/Concise.pm index 1ec6afb..2965d9c 100644 --- a/lib/Devel/REPL/Plugin/B/Concise.pm +++ b/lib/Devel/REPL/Plugin/B/Concise.pm @@ -9,7 +9,10 @@ B::Concise::compileOpts(qw(-nobanner)); use namespace::clean -except => [ 'meta' ]; -with qw(Devel::REPL::Plugin::Turtles); +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Turtles'); +} sub AFTER_PLUGIN { my $self = shift; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm index a8b42a9..0671f08 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm @@ -2,10 +2,6 @@ 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 d1aa4b3..2409a70 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm @@ -4,9 +4,10 @@ use File::Next; use File::Spec; use namespace::clean -except => [ 'meta' ]; -with qw( - Devel::REPL::Plugin::Completion -); +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Completion'); +} around complete => sub { my $orig = shift; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm index decc6c8..1178e8f 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm @@ -3,9 +3,10 @@ use Devel::REPL::Plugin; use B::Keywords qw/@Functions @Barewords/; use namespace::clean -except => [ 'meta' ]; -with qw( - Devel::REPL::Plugin::Completion -); +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Completion'); +} around complete => sub { my $orig = shift; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm index cd3ba0b..747163e 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm @@ -2,11 +2,6 @@ package Devel::REPL::Plugin::CompletionDriver::LexEnv; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; -with qw( - Devel::REPL::Plugin::Completion - Devel::REPL::Plugin::LexEnv -); - around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm index 4566b51..4044e1c 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm @@ -2,10 +2,12 @@ package Devel::REPL::Plugin::CompletionDriver::Methods; use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; -with qw( - Devel::REPL::Plugin::Completion - Devel::REPL::Plugin::FindVariable -); +sub BEFORE_PLUGIN { + my $self = shift; + for (qw/Completion FindVariable/) { + $self->load_plugin($_); + } +} around complete => sub { my $orig = shift; diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm b/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm index 2ba1641..351e67f 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm @@ -5,11 +5,6 @@ use Devel::REPL::Plugin; use namespace::clean -except => [ "meta" ]; -with qw( - Devel::REPL::Plugin::Completion - Devel::REPL::Plugin::Turtles -); - around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; diff --git a/lib/Devel/REPL/Plugin/LexEnv.pm b/lib/Devel/REPL/Plugin/LexEnv.pm index 4e01649..05ac905 100644 --- a/lib/Devel/REPL/Plugin/LexEnv.pm +++ b/lib/Devel/REPL/Plugin/LexEnv.pm @@ -4,7 +4,10 @@ use Devel::REPL::Plugin; use namespace::clean -except => [ 'meta' ]; use Lexical::Persistence; -with 'Devel::REPL::Plugin::FindVariable'; +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('FindVariable'); +} has 'lexical_environment' => ( isa => 'Lexical::Persistence', diff --git a/lib/Devel/REPL/Plugin/Nopaste.pm b/lib/Devel/REPL/Plugin/Nopaste.pm index 5dd268c..bff581a 100644 --- a/lib/Devel/REPL/Plugin/Nopaste.pm +++ b/lib/Devel/REPL/Plugin/Nopaste.pm @@ -4,7 +4,10 @@ use Devel::REPL::Plugin; use MooseX::AttributeHelpers; use namespace::clean -except => [ 'meta' ]; -with 'Devel::REPL::Plugin::Turtles'; +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Turtles'); +} has complete_session => ( metaclass => 'String', diff --git a/lib/Devel/REPL/Plugin/PPI.pm b/lib/Devel/REPL/Plugin/PPI.pm index 5a58214..85272d9 100644 --- a/lib/Devel/REPL/Plugin/PPI.pm +++ b/lib/Devel/REPL/Plugin/PPI.pm @@ -8,7 +8,10 @@ use PPI::Dumper; use namespace::clean -except => [ 'meta' ]; -with qw(Devel::REPL::Plugin::Turtles); +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Turtles'); +} sub expr_command_ppi { my ( $self, $eval, $code ) = @_; diff --git a/lib/Devel/REPL/Plugin/Peek.pm b/lib/Devel/REPL/Plugin/Peek.pm index 8e772ee..adb5667 100644 --- a/lib/Devel/REPL/Plugin/Peek.pm +++ b/lib/Devel/REPL/Plugin/Peek.pm @@ -7,7 +7,10 @@ use Devel::Peek qw(Dump); use namespace::clean -except => [ 'meta' ]; -with qw(Devel::REPL::Plugin::Turtles); +sub BEFORE_PLUGIN { + my $self = shift; + $self->load_plugin('Turtles'); +} sub expr_command_peek { my ( $self, $eval, $code ) = @_;