Mojolic...::Mount(3)
π Mojolic...::Mount(3) β the manual page, bestie edition
okay so this is the Mojolic...::Mount(3) page from the User Contributed Perl Documentation section, and honestly? it's giving "small plugin, big main character energy" π like it's short, but it does a LOT, so stay with me.
β¨ NAME β¨
Mojolicious::Plugin::Mount β it's the Application mount plugin, periodt. π
π¦ SYNOPSIS π¦
bestie just look at the code, it's all right here:
# Mojolicious
my $route = $app->plugin(Mount => {'/prefix' => '/home/sri/foo/script/foo'});
# Mojolicious::Lite
my $route = plugin Mount => {'/prefix' => '/home/sri/myapp.pl'};
# Adjust the generated route and mounted application
my $example = plugin Mount => {'/example' => '/home/sri/example.pl'};
$example->to(message => 'It works great!');
my $app = $example->pattern->defaults->{app};
$app->config(foo => 'bar');
$app->log(app->log);
# Mount application with host
plugin Mount => {'example.com' => '/home/sri/myapp.pl'};
# Host and path
plugin Mount => {'example.com/myapp' => '/home/sri/myapp.pl'};
# Or even hosts with wildcard subdomains
plugin Mount => {'*.example.com/myapp' => '/home/sri/myapp.pl'};
likeβ¦ host mounting? wildcard subdomains? we love a plugin that scales π β¨
πΈ DESCRIPTION πΈ
Mojolicious::Plugin::Mount is a plugin that lets you mount whole Mojolicious applications. not a route, not a controller β an entire app, mounted. slay. π«Ά
and here's the cute part: the code of this plugin is literally a good example for learning to build new plugins, so you're welcome to fork it. do it. i believe in you. π§
if you want the full roster of what ships by default, see "PLUGINS" in Mojolicious::Plugins β that's where the list of plugins available by default lives.
π METHODS π
Mojolicious::Plugin::Mount inherits all methods from Mojolicious::Plugin and implements the following new ones. yes, all of them, no cap.
β register
my $route = $plugin->register(Mojolicious->new, {'/foo' => '/some/app.pl'});
this one mounts a Mojolicious application and returns the generated route β which is usually a Mojolicious::Routes::Route object. you get the route back, you can keep vibing with it. π₯
π SEE ALSO π
MojoliciousMojolicious::Guides- <https://mojolicious.org>
like, go read them, iykyk ππ
okay that's the whole page, you ate that π and for the credits: this was perl v5.42.0, dated 2026-07-15 β shoutout to the Mojolic...::Mount(3) girlies, see you in the next manpage ππ
β¨
π¦ 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