MooseX::Runnable::Run - run a MooseX::Runnable class as an application
Write an app:
package MyApp; use Moose; with 'MooseX::Runnable'; sub run { say 'Hello, world.'; return 0 } # (UNIX exit code)
Write a wrapper script, myapp.pl. With sugar:
myapp.pl
#!/usr/bin/env perl use MooseX::Runnable::Run 'MyApp';
Or without:
#!/usr/bin/env perl use MooseX::Runnable::Run; run_application 'MyApp', @ARGV;
Then, run your app:
$ ./myapp.pl Hello, world. $ echo $? 0
This is a utility module that runs a MooseX::Runnable class with MooseX::Runnable::Invocation.
mx-run, a script that will run MooseX::Runnable apps, saving you valuable seconds!
MooseX::Runnable
To install MooseX::Runnable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Runnable
CPAN shell
perl -MCPAN -e shell install MooseX::Runnable
For more information on module installation, please visit the detailed CPAN module installation guide.