Skip to content

Commit

Permalink
made bad commands less fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 21, 2012
1 parent a9ac225 commit efb903f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Mojolicious/Commands.pm
Expand Up @@ -125,8 +125,10 @@ sub start_app {

sub _command {
my $module = shift;
if (my $e = Mojo::Loader->load($module)) { ref $e ? die $e : return }
return $module->isa('Mojolicious::Command') ? $module : undef;
return $module->isa('Mojolicious::Command') ? $module : undef
unless my $e = Mojo::Loader->load($module);
warn $e if ref $e;
return;
}

1;
Expand Down

0 comments on commit efb903f

Please sign in to comment.