Skip to content

Commit

Permalink
cleaned up command loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 21, 2011
1 parent 2733ca0 commit 37f23e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 1 addition & 4 deletions lib/Mojo/Command.pm
Expand Up @@ -210,10 +210,7 @@ sub run {
last if $module = _command("${namespace}::$name");

# DEPRECATED in Smiling Face With Sunglasses!
if ($module = _command("${namespace}::$class")) {
warn qq/Camel case command "$name" is DEPRECATED!!!\n/;
last;
}
last if $module = _command("${namespace}::$class");
}

# Command missing
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojolicious/Command/generate.pm
Expand Up @@ -14,7 +14,8 @@ usage: $0 generate GENERATOR [OPTIONS]
These generators are currently available:
EOF
has namespaces => sub { [qw/Mojolicious::Command::generate/] };
has namespaces =>
sub { [qw/Mojolicious::Command::generate Mojo::Command::generate/] };
has usage => <<"EOF";
usage: $0 generate GENERATOR [OPTIONS]
EOF
Expand Down Expand Up @@ -69,7 +70,7 @@ Short usage message shown before listing available generator commands.
$generator = $generator->namespaces(['Mojo::Command::generate']);
Namespaces to search for available generator commands, defaults to
L<Mojolicious::Command::generate>.
L<Mojolicious::Command::generate> and L<Mojo::Command::generate>.
=head1 METHODS
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Commands.pm
Expand Up @@ -16,7 +16,7 @@ These options are available for all commands:
See '$0 help COMMAND' for more information on a specific command.
EOF
has namespaces => sub { [qw/Mojolicious::Command/] };
has namespaces => sub { [qw/Mojolicious::Command Mojo::Command/] };

# Command line options for MOJO_HELP, MOJO_HOME and MOJO_MODE
BEGIN {
Expand Down Expand Up @@ -187,7 +187,7 @@ Short hint shown after listing available commands.
$commands = $commands->namespaces(['Mojolicious::Commands']);
Namespaces to search for available commands, defaults to
L<Mojolicious::Command>.
L<Mojolicious::Command> and L<Mojo::Command>.
=head1 METHODS
Expand Down

0 comments on commit 37f23e2

Please sign in to comment.