Jonathan Rockway > MooseX-Runnable-0.03 > MooseX::Runnable::Run

Download:
MooseX-Runnable-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: MooseX-Runnable-0.07

NAME ^

MooseX::Runnable::Run - run a MooseX::Runnable class as an application

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.

SEE ALSO ^

mx-run, a script that will run MooseX::Runnable apps, saving you valuable seconds!

MooseX::Runnable

syntax highlighting: