with 'Catalyst::ScriptRole';
+has '+help' => (cmd_aliases => 'h');
+
has force => (
traits => [qw(Getopt)],
cmd_aliases => 'nonew',
sub run {
my ($self) = @_;
- $self->_display_help if ( !$ARGV[0] );
+ $self->_exit_with_usage if !$ARGV[0];
my $helper = Catalyst::Helper->new( { '.newfiles' => !$self->force, mech => $self->mech } );
}
__PACKAGE__->meta->make_immutable;
-1;
=head1 NAME
=head1 SYNOPSIS
-myapp_create.pl [options] model|view|controller name [helper] [options]
+ myapp_create.pl [options] model|view|controller name [helper] [options]
Options:
-force don't create a .new file where a file to be created exists
it under the same terms as Perl itself.
=cut
+