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
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;
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) = @_;
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;
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;
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) = @_;
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;
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) = @_;
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',
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',
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 ) = @_;
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 ) = @_;