/usr/bin/mx-run is in libmoosex-runnable-perl 0.09-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #!/usr/bin/perl
use strict;
use warnings;
use MooseX::Runnable::Util::ArgParser;
use MooseX::Runnable::Invocation::MxRun;
exit run();
sub run {
my $args = MooseX::Runnable::Util::ArgParser->new(
argv => \@ARGV,
);
help() if $args->is_help;
# set @INC from -I...
unshift @INC, $_->stringify for $args->include_paths;
# load -M... modules
do { eval "require $_"; die $@ if $@ }
for $args->modules;
my $app = $args->class_name;
local $0 = "mx-run ... $app";
return MooseX::Runnable::Invocation::MxRun->new(
class => $app,
plugins => $args->plugins,
parsed_args => $args,
)->run($args->app_args);
}
sub help {
print <<'END';
This is mx-run, a utility for running MooseX::Runnable classes.
usage: mx-run <mx-run options> -- Class::Name <options for Class::Name>
mx-run options:
--help -? -h Print this message
-I<path> Add <path> to @INC before loading modules
-M<module> use <module> immediately
+PluginName Load PluginName (see MooseX::Runnable::Invocation)
Note that as soon as +PluginName is seen, all following -[IM] options
are ignored by mx-run, and are instead processed by PluginName. So
put them at the very beginning.
In the simplest cases, where you use only -I or -M (no plugins), you
may omit the -- before the class name.
To get help for Class::Name, run:
mx-run Class::Name --help
Syntax examples:
mx-run -Ilib Class::Name # Local Class::Name
mx-run -Ilib -MCarp::Always +Debug -- Class::Name # Debugging
END
exit 1;
}
__END__
=head1 NAME
mx-run - script to run MooseX::Runnable classes
=head1 SEE ALSO
L<MooseX::Runnable>
|