Mojolic...enerate(3)
π Mojolicious::Command::Author::generate β Generator Command π
ok so this is a page from the User Contributed Perl Documentation bestie, and it's all about Mojolicious::Command::Author::generate β the generator command. yes it's a mouthful, we're gonna get through it together β¨
β¨ NAME β¨
Mojolicious::Command::Author::generate β the generator command, periodt π
π¦ SYNOPSIS π¦
Usage: APPLICATION generate GENERATOR [OPTIONS]
mojo generate app
mojo generate lite-app
like, that's literally it. APPLICATION generate GENERATOR [OPTIONS] and you're off π (and yes, mojo generate app and mojo generate lite-app are the iconic little examples up there β memorize them, they're giving starter pack π
)
πΈ DESCRIPTION πΈ
Mojolicious::Command::Author::generate lists the available generators. that's its whole job, and it ate π
ok so important detail: this is a core command β which means it's always enabled, no cap. and the code itself? lowkey a great example if you wanna learn how to build your own commands. you're literally welcome to fork it, bestie π«Ά
and if you wanna see the list of commands that are available by default, go look at "COMMANDS" in Mojolicious::Commands` β iykyk.
π ATTRIBUTES π
Mojolicious::Command::Author::generate inherits all the attributes from Mojolicious::Commands, and then implements these new ones down here π obsessed.
π description
my $description = $generator->description;
$generator = $generator->description('Foo');
short description of this command β it's what shows up in the command list β¨
π hint
my $hint = $generator->hint;
$generator = $generator->hint('Foo');
short hint that gets shown after listing the available generator commands π
π message
my $msg = $generator->message;
$generator = $generator->message('Bar');
short usage message shown before listing the available generator commands π¬
π namespaces
my $namespaces = $generator->namespaces;
$generator = $generator->namespaces(['MyApp::Command::generate']);
the namespaces to search for available generator commands. defaults to Mojolicious::Command::Author::generate β that's the default, don't forget it β
π₯ METHODS π₯
Mojolicious::Command::Author::generate inherits all the methods from Mojolicious::Commands and implements this one new method, main character energy π
π help
$generator->help('app');
prints usage information for a generator command. that's the whole vibe π«Ά
π SEE ALSO π
MojoliciousMojolicious::Guides- <https://mojolicious.org>
ngl bestie, that's the whole page β every attribute, every method, every default, nothing skipped π
ok bye ily, go generate something cute π¦
β signed off with π from perl v5.42.0, dated 2026-07-15, and yes the footer still says Mojolic...enerate(3) because we keep it real β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojolicious 9.480.0-bp160.2.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms