use lib "$Bin/../lib";
use Pod::Usage;
use Moose;
-use namespace::clean -except => [ qw(meta) ];
+use namespace::autoclean;
with 'MooseX::Getopt';
-has app => ( isa => 'Str', is => 'ro', required => 1 );
-has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
+has _app => (
+ reader => 'app',
+ init_arg => 'app',
+ traits => [qw(NoGetopt)],
+ isa => 'Str',
+ is => 'ro',
+);
+
+has help => (
+ traits => [qw(Getopt)],
+ cmd_aliases => 'h',
+ isa => 'Bool',
+ is => 'ro',
+ documentation => qq{ display this help and exits },
+);
+
sub run {
my $self = shift;
-
+
pod2usage() if $self->help;
my $app = $self->app;
Class::MOP::load_class($app);