6 use MooseX::Runnable::Util::ArgParser;
7 use MooseX::Runnable::Run; # incidentally, we don't actually use this...
12 my $args = MooseX::Runnable::Util::ArgParser->new(
16 help() if $args->is_help;
19 unshift @INC, $_->stringify for $args->include_paths;
22 do { eval "require $_"; die $@ if $@ }
25 my $app = $args->class_name;
26 local $0 = "mx-run ... $app";
28 return MooseX::Runnable::Invocation->new(
30 plugins => [ keys %{$args->plugins} ], # XXX: fixme
31 )->run($args->app_args);
37 This is mx-run, a utility for running MooseX::Runnable classes.
39 usage: mx-run <mx-run options> -- Class::Name <options for Class::Name>
43 --help -? -h Print this message
44 -I<path> Add <path> to @INC before loading modules
45 -M<module> use <module> immediately
46 +PluginName Load PluginName (see MooseX::Runnable::Invocation)
48 Note that as soon as +PluginName is seen, all following -[IM] options
49 are ignored by mx-run, and are instead processed by PluginName. So
50 put them at the very beginning.
52 In the simplest cases, where you use only -I or -M (no plugins), you
53 may omit the -- before the class name.
55 To get help for Class::Name, run:
57 mx-run Class::Name --help
61 mx-run -Ilib Class::Name # Local Class::Name
62 mx-run -Ilib -MCarp::Always +Debug -- Class::Name # Debuggin
73 mx-run - script to run MooseX::Runnable classes