package MooseX::Runnable;
use Moose::Role;
+our $VERSION = '0.00_01';
+
requires 'run';
1;
sub run {
my $name = shift;
say "Hello, $name.";
- return 0;
+ return 0; # success
}
Then you can run this class as an application with the included
The syntax is:
- mx-run <args for mx-run> Class::Name <args for Class::Name>
+ mx-run <args for mx-run> -- Class::Name <args for Class::Name>
for example:
- mx-run -Ilib App::HelloWorld --args --go --here
+ mx-run -Ilib -- App::HelloWorld --args --go --here
+
+or:
+ mx-run -Ilib +Persistent --port 8080 -Persistent -- App::HelloWorld --args --go --here
=head2 C<MooseX::Runnable::Run>
If you don't want to invoke your app with C<mx-run>, you can write a