Mojito logo Mojito
Perl · CGI-first · low-resource shared hosting

A very small glass of modern Perl web framework.

Mojito is for the places where Perl CGI is still the practical deployment target: shared hosting, tiny utilities, internal tools, and small sites where every request may be competing for memory and CPU.

Independent project. Heavily influenced by the excellent ideas, ergonomics, and cooking of Mojolicious. Mojito is not affiliated with the Mojolicious project.

Mojito logo showing a terminal and fresh green leaves

Before choosing Mojito

If you can run Mojolicious comfortably, use Mojolicious.

Mojolicious is the broader, mature, full-featured Perl web framework. It gives you the modern application runtime, built-in servers, WebSockets, a rich toolkit, plugins, testing support, and room to grow. CGI support exists there too, but it is understandably not the center of the architecture.

Mojito exists for the narrower edge case: a shared host gives you cgi-bin, persistent services are unavailable or undesirable, resources are tight, and you still want pleasant Perl web-development patterns.

Made for constraints

When “just run the CGI” is a feature.

Mojito treats process startup, memory use, CPU contention, filesystem access, and repeat work as first-class design constraints instead of pretending a shared server behaves like a dedicated application host.

Short startup path

Favor a thin request lifecycle, modest dependencies, and predictable per-request work so CGI startup stays practical.

🪶

Hardened for contention

Designed for very small shared servers where your process may be fighting many neighbors for memory and CPU attention.

🧊

Cache whenever it pays

Avoid repeating expensive work. Cache configuration, rendered output, lookups, and other safe reusable results where the CGI lifecycle allows it.

🔐

Auth scaffold included

Start with login, logout, protected dashboard flow, sessions, and the wiring developers usually have to build before the real application begins.

🍸

Familiar Mojolicious cooking

Routes, rendering, helpers, responses, and developer ergonomics are shaped by lessons from Mojolicious wherever they make sense for CGI.

🏠

Shared-host practical

Designed for ordinary cgi-bin deployment where a daemon, reverse proxy configuration, containers, or root access may simply not be available.

Useful on request one

Authentication scaffolding without turning the starter app into a platform.

A new Mojito application can start with the basic authenticated application shape already present: login, logout, a protected dashboard, session handling, and extension points for your own users, roles, and application rules.

The goal is not to prescribe your product. It is to remove repetitive plumbing so your first changes can be the parts that make your application yours.

01

Login

A clean starting flow you can connect to your own user store.

02

Dashboard

A protected route and page that demonstrates authenticated application structure.

03

Logout

Session teardown is part of the scaffold instead of an afterthought.

Tiny by intent

A request should read like the thing it does.

The API can feel modern without pretending CGI is an application server. Mojito keeps the boundary visible and tries to make the common path cheap.

#!/usr/bin/env perl
use v5.26;
use Mojito;

get '/' => sub ($c) {
    $c->render(text => 'Fresh CGI. Modern Perl.');
};

app->run;

Choose the narrow tool on purpose

If CGI is your deployment reality, Mojito is built for that reality.

Start small, inherit an authentication-shaped application, cache safe repeated work, and keep the request path lean. When the application outgrows CGI, that is a good day: graduate to Mojolicious or another full application framework.

# cgi-bin/mojito.cgi
chmod 755 mojito.cgi
./mojito.cgi