The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojolicious::Commands - Commands

SYNOPSIS

use Mojo::Commands;

# Command line interface
my $commands = Mojolicious::Commands->new;
$commands->run(@ARGV);

DESCRIPTION

Mojolicous::Commands is the interactive command line interface to the Mojolicious framework. It will automatically detect available commands in the Mojolicious::Command namespace.

These commands are available by default in addition to the commands listed in Mojo::Commands.

generate
mojo generate
mojo generate help

List 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 Mojolicious application.

generate lite_app
mojo generate lite_app

Generate a fully functional Mojolicious::Lite application.

generate makefile
mojo generate makefile

Generate Makefile.PL file for application.

inflate
myapp.pl inflate

Turn embedded files from the DATA section into real files.

routes
myapp.pl routes
script/myapp routes

List application routes.

ATTRIBUTES

Mojolicious::Commands inherits all attributes from Mojo::Commands and implements the following new ones.

hint

my $hint  = $commands->hint;
$commands = $commands->hint('Foo!');

Short hint shown after listing available commands.

namespaces

my $namespaces = $commands->namespaces;
$commands      = $commands->namespaces(['Mojolicious::Commands']);

Namespaces to search for available commands, defaults to Mojo::Command and Mojolicious::Command.

METHODS

Mojolicious::Commands inherits all methods from Mojo::Commands.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicious.org.