with 'MooseX::Getopt';
+has debug => (
+ traits => [qw(Getopt)],
+ cmd_aliases => 'd',
+ isa => 'Bool',
+ is => 'ro',
+ documentation => qq{
+ -d --debug force debug mode
+ }
+
+);
+
has help => (
traits => [qw(Getopt)],
cmd_aliases => 'h',
isa => 'Bool',
is => 'ro',
- ,
- default => 0,
+ documentation => qq{
+ -h --help display this help and exits
+ },
);
has host => (
isa => 'Bool',
is => 'ro',
,
- default => 0
+
);
has background => (
);
+sub usage {
+ my ($self) = shift;
+
+ return pod2usage();
+
+}
+
my @argv = @ARGV;
sub run {
my $self = shift;
- pod2usage() if $self->help;
+ $self->usage if $self->help;
my $app = $self->app;
- warn "App is $app";
Class::MOP::load_class($app);
$app->run(
$self->listen, $self->host,
}
+no Moose;
+__PACKAGE__->meta->make_immutable;
1;