use namespace::autoclean;
with 'MooseX::Getopt' => {
- excludes => [qw/
+ -excludes => [qw/
_getopt_spec_warnings
_getopt_spec_exception
_getopt_full_usage
};
has application_name => (
- traits => ['NoGetopt'],
- isa => Str,
- is => 'ro',
+ traits => ['NoGetopt'],
+ isa => Str,
+ is => 'ro',
required => 1,
);
-has help => (
- traits => ['Getopt'],
- isa => Bool,
- is => 'ro',
- documentation => q{Display this help and exit},
-);
-
sub _getopt_spec_exception {}
sub _getopt_spec_warnings {
exit 0;
}
-before run => sub {
- my $self = shift;
- $self->_getopt_full_usage if $self->help;
-};
-
sub run {
my $self = shift;
$self->_run_application;
use Moose;
use namespace::autoclean;
- with 'Catalyst::Script::Role';
+ with 'Catalyst::ScriptRole';
- sub _application_args { ... }
+ sub _application_args { ... }
=head1 DESCRIPTION
it under the same terms as Perl itself.
=cut
-