X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCreate.pm;h=47965a6a16ed52987d77b9ec2c82b9933cabe96f;hb=b1320d7d840eafaee3efab338ede2e05da9df739;hp=575f9e7f0a687ba1c5ac8384e2ebd1f9fde0e1e9;hpb=cbaaecc0ac826c500c8c947cff8e3a0d3b4fe0da;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Create.pm b/lib/Catalyst/Script/Create.pm index 575f9e7..47965a6 100644 --- a/lib/Catalyst/Script/Create.pm +++ b/lib/Catalyst/Script/Create.pm @@ -6,6 +6,8 @@ use namespace::autoclean; with 'Catalyst::ScriptRole'; +has '+help' => (cmd_aliases => 'h'); + has force => ( traits => [qw(Getopt)], cmd_aliases => 'nonew', @@ -33,7 +35,7 @@ has mechanize => ( 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 } ); @@ -42,7 +44,6 @@ sub run { } __PACKAGE__->meta->make_immutable; -1; =head1 NAME @@ -92,3 +93,4 @@ This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =cut +