From 0a90fc02921f9bb1496f7a74714221368443a68e Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Sat, 24 Mar 2012 15:24:58 +0100 Subject: [PATCH] Mojolicious::Commands does not need to inherit from Mojo::Command --- lib/Mojolicious/Commands.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Mojolicious/Commands.pm b/lib/Mojolicious/Commands.pm index cfae484916..51303a7398 100644 --- a/lib/Mojolicious/Commands.pm +++ b/lib/Mojolicious/Commands.pm @@ -1,9 +1,10 @@ package Mojolicious::Commands; -use Mojo::Base 'Mojo::Command'; +use Mojo::Base 'Mojo::Base'; use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case pass_through/; use Mojo::Loader; +use Mojo::Server; # "One day a man has everything, the next day he blows up a $400 billion # space station, and the next day he has nothing. It makes you think." @@ -55,7 +56,7 @@ sub run { my ($self, $name, @args) = @_; # Application loader - return $self->app if defined $ENV{MOJO_APP_LOADER}; + return Mojo::Server->new->app if defined $ENV{MOJO_APP_LOADER}; # Try to detect environment $name = $self->detect($name) unless $ENV{MOJO_NO_DETECT}; @@ -286,8 +287,7 @@ for debugging. =head1 ATTRIBUTES -L inherits all attributes from L and -implements the following new ones. +L implements the following attributes. =head2 C @@ -313,7 +313,7 @@ C and C. =head1 METHODS -L inherits all methods from L and +L inherits all methods from L and implements the following new ones. =head2 C @@ -333,15 +333,15 @@ disabled with the C environment variable. =head2 C - Mojo::Command->start; - Mojo::Command->start(@ARGV); + Mojolicious::Commands->start; + Mojolicious::Commands->start(@ARGV); Start the command line interface. =head2 C - Mojo::Command->start_app('MyApp'); - Mojo::Command->start_app(MyApp => @ARGV); + Mojolicious::Commands->start_app('MyApp'); + Mojolicious::Commands->start_app(MyApp => @ARGV); Start the command line interface for application.