Commit | Line | Data |
---|---|---|
32ef7eca | 1 | package MyApp; |
2 | use Moose; | |
3 | use 5.010; | |
4 | ||
5 | with 'MooseX::Runnable', 'MooseX::Getopt'; | |
6 | ||
7 | has 'name' => ( is => 'ro', isa => 'Str', default => 'world', documentation => | |
8 | 'Your name, defaults to "world"' ); | |
9 | ||
10 | sub run { | |
11 | my ($self, $name) = @_; | |
12 | say 'Hello, '. $self->name. '.'; | |
13 | return 0; | |
14 | } | |
15 | ||
16 | 1; | |
17 | ||
18 | __END__ | |
19 | ||
20 | cd to this dir, and then run "mx-run MyApp --help" |