Punk documentation
Punk is a Perl MVC web framework that resolves and freezes everything -
routes, guard chains, handler coderefs, helpers, mounts - once, at
to_app time. Nothing is interpreted per request.
Start with Getting started, or jump to the guide for the part you need:
- Routing - routes, captures, guard scopes
- Controllers and the context -
including
send_filedownloads andrespond_tonegotiation - Uploads and files - streamed multipart, content-addressed storage, virus scanning
- Templates - Stencil views
- Models - sync and async database access
- Caching - Punk::Cache, the memory tier, idempotent replays
- Async - Punk::Future, timers, awaiting
- WebSockets and SSE
- OpenAPI - mount a 3.1 document
- GraphQL - Punk::GraphQL on the Houtou XS runtime
- Sessions and security - sessions (cookie and server-side), CSRF, CORS, security headers, CSP, rate limiting
- Authentication - Punk::Auth guards, passwords, tokens, TOTP second factor
- OAuth2 and OIDC - social login, Bearer checkers, an authorization server
- I18n - translations, negotiation, CLDR plurals
- SEO and HTTP caching - the sitemap, fingerprinted assets, ETags and 304s
- Atom and RSS feeds - Punk::Feed: both formats from one set of entries, autodiscovery, conditional GET
- Web push notifications - Punk::Push: VAPID keys, subscriptions, encrypted delivery, pruning
- Config and secrets
- The job queue - Punk::Queue and the Funky admin UI
- Mail - Punk::Mailer: templates, SMTP and HTTP transports, sending through the queue, tokens by mail
- Observability - request ids, Prometheus metrics, health probes, OpenTelemetry
- Deployment
The recipes hold worked examples, including
how this site is built with Punk's own
markdown mount.