NAME
Mojo::Commands - Commands
SYNOPSIS
use Mojo::Commands;# Command line interfacemy $commands = Mojo::Commands->new;$commands->run(@ARGV);
DESCRIPTION
Mojo::Commands is the interactive command line interface to the Mojo framework. It will automatically detect available commands in the Mojo::Command namespace. Commands are implemented by subclassing Mojo::Command.
These commands are available by default.
- "help"
-
mojomojo helpList available commands with short descriptions.
mojo help <command>List available options for the command with short descriptions.
- "generate"
-
mojo generatemojo generate helpList available generator commands with short descriptions.
mojo generate help <generator>List available options for generator command with short descriptions.
- "generate app"
-
mojo generate app <AppName>Generate application directory structure for a fully functional Mojo application.
- "generate makefile"
-
script/myapp generate makefileGenerate
"Makefile.PL"file for application.
- "generate psgi"
-
script/myapp generate psgiGenerate
"myapp.psgi"file for application.
- "cgi"
-
mojo cgiscript/myapp cgiStart application with CGI backend.
- "daemon"
-
mojo cgiscript/myapp daemonStart application with standalone HTTP 1.1 server backend.
- "daemon_prefork"
-
mojo daemon_preforkscript/myapp daemon_preforkStart application with preforking standalone HTTP 1.1 server backend.
- "fastcgi"
-
mojo fastcgiscript/myapp fastcgiStart application with FastCGI backend.
- "get"
-
mojo get http://mojolicious.orgscript/myapp get /fooPerform GET request to remote host or local application.
- "test"
-
mojo testscript/myapp testscript/myapp test t/foo.tRuns application tests from the
"t"directory.
- "version"
-
mojo versionList version information for installed core and optional modules, very useful for debugging.
ATTRIBUTES
Mojo::Commands inherits all attributes from Mojo::Command and implements the following new ones.
"hint"
my $hint = $commands->hint;$commands = $commands->hint('Foo!');
Short hint shown after listing available commands.
"message"
my $message = $commands->message;$commands = $commands->message('Hello World!');
Short usage message shown before listing available commands.
"namespaces"
my $namespaces = $commands->namespaces;$commands = $commands->namespaces(['Mojo::Command']);
Namespaces to search for available commands, defaults to Mojo::Command.
METHODS
Mojo::Commands inherits all methods from Mojo::Command and implements the following new ones.
"run"
$commands->run;$commands->run(@ARGV);
Load and run commands.
"start"
Mojo::Commands->start;Mojo::Commands->start(@ARGV);
Start the command line interface.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.