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
    mojolicious generate
    mojolicious generate help

List available generator commands with short descriptions.

    mojolicious generate help <generator>

List available options for generator command with short descriptions.

generate app
    mojolicious generate app <AppName>

Generate application directory structure for a fully functional Mojolicious application.

generate lite_app
    mojolicious generate lite_app

Generate a fully functional Mojolicious::Lite 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.

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.