use warnings;
use MooseX::Runnable::Util::ArgParser;
-use MooseX::Runnable::Run; # incidentally, we don't actually use this...
+use MooseX::Runnable::Invocation::MxRun;
exit run();
my $app = $args->class_name;
local $0 = "mx-run ... $app";
- return MooseX::Runnable::Invocation->new(
- class => $app,
- plugins => $args->plugins,
+ return MooseX::Runnable::Invocation::MxRun->new(
+ class => $app,
+ plugins => $args->plugins,
+ parsed_args => $args,
)->run($args->app_args);
}
--- /dev/null
+package MooseX::Runnable::Invocation::MxRun;
+use Moose;
+
+extends 'MooseX::Runnable::Invocation';
+with 'MooseX::Runnable::Invocation::Role::WithParsedArgs';
+
+1;
--- /dev/null
+package MooseX::Runnable::Invocation::Role::WithParsedArgs;
+use Moose::Role;
+use MooseX::Runnable::Util::ArgParser;
+
+has 'parsed_args' => (
+ is => 'ro',
+ isa => 'MooseX::Runnable::Util::ArgParser',
+ required => 1,
+);
+
+1;