Permalink
Browse files

no MooseX::Object::Pluggable for bootstrap speed

  • Loading branch information...
1 parent 76ca662 commit 63e1a1180d8ad9128d623116077046f6227a8894 @tokuhirom committed Feb 10, 2013
Showing with 7 additions and 7 deletions.
  1. +0 −1 Makefile.PL
  2. +7 −6 lib/Devel/REPL.pm
View
@@ -14,7 +14,6 @@ requires 'Term::ReadLine';
# rest
requires 'Moose' => '0.93';
-requires 'MooseX::Object::Pluggable' => '0.0009';
requires 'MooseX::Getopt' => '0.18';
requires 'namespace::autoclean';
requires 'File::HomeDir';
View
@@ -7,10 +7,15 @@ use 5.008001; # backwards compat, doesn't warn like 5.8.1
our $VERSION = '1.003014';
-with 'MooseX::Object::Pluggable';
-
use Devel::REPL::Error;
+sub load_plugin {
+ my ($self, $plugin) = @_;
+ $plugin = "Devel::REPL::Plugin::$plugin";
+ eval "require $plugin; 1" or die $@;
+ $self->meta->add_role($plugin->meta);
@ilmari

ilmari Feb 15, 2013

Please use Module::Runtime::use_module($plugin) instead of eval "require $plugin; 1" or die $@. It conveniently returns the module name, so you can just do $self->meta->add_role(use_module($plugin)->meta);

@tokuhirom

tokuhirom Feb 16, 2013

Owner

Okay, I'll use M::Runtime when I push to mst's repo.

+}
+
has 'term' => (
is => 'rw', required => 1,
default => sub { Term::ReadLine->new('Perl REPL') }
@@ -366,10 +371,6 @@ L<Moose> >= 0.74
=item *
-L<MooseX::Object::Pluggable> >= 0.0009
-
-=item *
-
L<MooseX::Getopt> >= 0.18
=item *

0 comments on commit 63e1a11

Please sign in to comment.