Skip to content

Commit

Permalink
Use Module::Runtime instead of Class::MOP::load_class
Browse files Browse the repository at this point in the history
to avoid the Moose deprecation message
  • Loading branch information
rwstauner committed Feb 7, 2014
1 parent cf2caee commit 0556b37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpanfile
Expand Up @@ -27,7 +27,6 @@ requires 'Catalyst::View::JSON';
requires 'CatalystX::Component::Traits';
requires 'CatalystX::InjectComponent';
requires 'CatalystX::RoleApplicator';
requires 'Class::MOP';
requires 'Config::JFDI';
requires 'Cwd';
requires 'DBD::SQLite', '1.33';
Expand Down Expand Up @@ -88,6 +87,7 @@ requires 'Log::Log4perl';
requires 'Log::Log4perl::Appender::ScreenColoredLevels';
requires 'Module::Metadata', '1.000012';
requires 'Module::Pluggable';
requires 'Module::Runtime';
requires 'Moose';
requires 'Moose::Role';
requires 'Moose::Util';
Expand Down
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Script/Runner.pm
@@ -1,7 +1,7 @@
package MetaCPAN::Script::Runner;
use strict;
use warnings;
use Class::MOP;
use Module::Runtime ();
use Config::JFDI;
use FindBin;
use IO::Interactive qw(is_interactive);
Expand All @@ -14,7 +14,7 @@ sub run {
= map { ( my $key = $_ ) =~ s/^MetaCPAN::Script:://; lc($key) => $_ }
plugins;
die "Usage: metacpan [command] [args]" unless ($class);
Class::MOP::load_class( $plugins{$class} );
Module::Runtime::require_module( $plugins{$class} );

my $config = build_config();
my $obj = $plugins{$class}->new_with_options($config);
Expand Down

0 comments on commit 0556b37

Please sign in to comment.