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 🌟


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