MooseX::Runnable::Run(3) Run a MooseX::Runnable class as an application

VERSION

version 0.09

SYNOPSIS

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:

   #!/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

DESCRIPTION

This is a utility module that runs a MooseX::Runnable class with MooseX::Runnable::Invocation.

AUTHOR

Jonathan Rockway <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by Jonathan Rockway.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.