From: Jonathan Rockway Date: Tue, 31 Mar 2009 08:58:51 +0000 (-0500) Subject: add an example X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Runnable.git;a=commitdiff_plain;h=32ef7ecad74be19a01b4fe9d9f0f5b35c19836fd add an example --- diff --git a/example/MyApp.pm b/example/MyApp.pm new file mode 100644 index 0000000..44420a7 --- /dev/null +++ b/example/MyApp.pm @@ -0,0 +1,20 @@ +package MyApp; +use Moose; +use 5.010; + +with 'MooseX::Runnable', 'MooseX::Getopt'; + +has 'name' => ( is => 'ro', isa => 'Str', default => 'world', documentation => + 'Your name, defaults to "world"' ); + +sub run { + my ($self, $name) = @_; + say 'Hello, '. $self->name. '.'; + return 0; +} + +1; + +__END__ + +cd to this dir, and then run "mx-run MyApp --help"