- converted uses of Path::Class to Path::Tiny (Karen Etheridge)
+ - removed use of deprecated Class::MOP::load_class
0.03 Sat Jun 26 23:19:41 CDT 2010
- modified verification of RunnableClass values to use
use MooseX::Types::Moose qw(Str HashRef ArrayRef);
use List::MoreUtils qw(uniq);
use Params::Util qw(_CLASS);
+use Module::Runtime 'use_module';
use namespace::autoclean;
-require Class::MOP;
-
# we can't load the class until plugins are loaded,
# so we have to handle this outside of coerce
$plugin = "$plugin_ns$plugin" unless $plugin =~ /^[+]/;
$plugin =~ s/^[+]//g;
- Class::MOP::load_class( $plugin );
+ use_module( $plugin );
my $does_cmdline = $plugin->meta->
does_role('MooseX::Runnable::Invocation::Plugin::Role::CmdlineArgs');
my $self = shift;
my $class = $self->class;
- Class::MOP::load_class( $class );
+ use_module( $class );
confess 'We can only work with Moose classes with "meta" methods'
if !$class->can('meta');
$name = "MooseX::Runnable::Invocation::Scheme::$name";
return eval {
- Class::MOP::load_class($name);
+ use_module($name);
warn "$name was loaded OK, but it's not a role!" and return
unless $name->meta->isa('Moose::Meta::Role');
return $name->meta;