Skip to content

Commit

Permalink
improved help command to be less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 8, 2012
1 parent 16d07cb commit f595c18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
This file documents the revision history for Perl extension Mojolicious.

2.77 2012-04-08
- Improved help command to be less strict.
- Improved documentation. (tempire, sri)
- Improved tests.
- Fixed bug that prevented --help and -h flags from working for generator
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Command/generate/app.pm
Expand Up @@ -2,7 +2,7 @@ package Mojolicious::Command::generate::app;
use Mojo::Base 'Mojo::Command';

has description => "Generate Mojolicious application directory structure.\n";
has usage => "usage: $0 generate app [CLASS]\n";
has usage => "usage: $0 generate app [NAME]\n";

# "I say, you've damaged our servants quarters... and our servants."
sub run {
Expand Down
5 changes: 2 additions & 3 deletions lib/Mojolicious/Commands.pm
Expand Up @@ -64,9 +64,8 @@ sub run {
if ($name && $name =~ /^\w+$/ && ($name ne 'help' || $args[0])) {

# Help
my $help = $name eq 'help';
$name = shift @args if $help;
$help = 1 if $ENV{MOJO_HELP};
$name = shift @args if my $help = $name eq 'help';
$help = $ENV{MOJO_HELP} = $ENV{MOJO_HELP} ? 1 : $help;

# Try all namespaces
my $module;
Expand Down

0 comments on commit f595c18

Please sign in to comment.