Class::MOP::load_class, is_class_loaded was deprecated in Moose-2.1100
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ScriptRole.pm
index 50949c7..f8a12da 100644 (file)
@@ -5,6 +5,7 @@ use MooseX::Getopt;
 use Catalyst::EngineLoader;
 use Moose::Util::TypeConstraints;
 use Catalyst::Utils qw/ ensure_class_loaded /;
+use Class::Load 'load_class';
 use namespace::autoclean;
 
 subtype 'Catalyst::ScriptRole::LoadableClass',
@@ -14,6 +15,7 @@ coerce 'Catalyst::ScriptRole::LoadableClass',
   via { ensure_class_loaded($_); 1 };
 
 with 'MooseX::Getopt' => {
+    -version => 0.48,
     -excludes => [qw/
         _getopt_spec_warnings
         _getopt_spec_exception
@@ -86,7 +88,7 @@ sub _plack_engine_name {}
 sub _run_application {
     my $self = shift;
     my $app = $self->application_name;
-    Class::MOP::load_class($app);
+    load_class($app);
     my $server;
     if (my $e = $self->_plack_engine_name ) {
         $server = $self->load_engine($e, $self->_plack_loader_args);
@@ -123,6 +125,10 @@ Role with the common functionality of Catalyst scripts.
 
 The method invoked to run the application.
 
+=head2 print_usage_text
+
+Prints out the usage text for the script you tried to invoke.
+
 =head1 ATTRIBUTES
 
 =head2 application_name