Changes for version 0.10 - 2026-08-15
- Development error pages (Punk::DevError): in development a die renders an HTML debug page
- The environment now defaults to production; development is an opt-in: punk dev sets PUNK_ENV=development for its server, or set it yourself in the Env.
- Punk::Validate: request validation, all in C on the JSON::Schema::Fast C ABI. $c->validate($schema) collects into a Result - errors in the Open::API shape plus name, valid() hands back typed filtered params - and a bare $c->validate reads the Result a route-level check stashed. Routes take an options hashref: get '/x' => $target, { validate => \%schema } (or { schema, source, on_invalid }), compiled once at to_app and run as a C guard after any auth guards; failures answer the OpenAPI-mount-shaped 400 or the on_invalid target.
- New on_not_found keyword: the on_error contract for a 404 so you can return a custom response
- The getentropy probe now links instead of only compiling. FreeBSD before 12 has no getentropy and its old compilers take the implicit declaration as a warning, so 0.09's compile-only probe false-positived and the .so failed to load with "Undefined symbol getentropy".
Modules
a MVC web framework
the per-application registry and boot compiler
cross-origin resource sharing
single-use CSRF tokens
the subcommands behind the punk tool
YAML configuration with secrets kept out of the file
the per-request object
base class for Punk controllers
the development error page
an async result that runs on the loop, or blocks
scaffold a new Punk application
a level-based logger
the storage-agnostic model tier
the default DBI backend for Punk models
a non-blocking backend for Punk models
a directory of markdown as a documentation site
the api mount: spec-first operations
base class for Punk plugins
rate limiting and IP blocking over Hyperman's shared arena
a lazy wrapper over the PSGI environment
a response builder
the compiled-at-boot route tables (XS)
the handle an under returns
a Server-Sent Events stream
signed cookie sessions
serving files from a directory
an in-process test client for Punk applications
a pure-Perl RFC 6455 codec for testing WebSocket servers
the client side of one WebSocket connection
the outbound HTTP agent on the context
an uploaded file from a multipart form
collecting request validation
the Template::Stencil view engine
the pluggable view engine registry (XS)
a WebSocket connection
pub/sub groups of WebSocket connections
Provides
in bench/apps/cat-lib/BenchCat.pm
in bench/apps/cat-lib/BenchCat/Controller/Root.pm
in lib/Punk/Test.pm
Examples
- example/Chat/README.pod
- example/Chat/app.psgi
- example/Chat/bin/make-cert
- example/Chat/bin/punk-chat
- example/Chat/bin/tls-proxy
- example/Chat/docs/api.md
- example/Chat/docs/index.md
- example/Chat/docs/reference/config.md
- example/Chat/docs/running.md
- example/Chat/docs/websockets.md
- example/Chat/lib/Chat.pm
- example/Chat/lib/Chat/Auth.pm
- example/Chat/lib/Chat/Bus.pm
- example/Chat/lib/Chat/Controller/API/Message.pm
- example/Chat/lib/Chat/Controller/WS/Chat.pm
- example/Chat/lib/Chat/Controller/Web/Chat.pm
- example/Chat/lib/Chat/Model/Message.pm
- example/Chat/lib/Chat/Schema.pm
- example/Chat/openapi.json
- example/Chat/root/static/chat.css
- example/Chat/root/static/chat.js
- example/Chat/root/templates/index.tmpl
- example/Chat/root/templates/layout.tmpl
- example/Chat/root/templates/room.tmpl
- example/Chat/tls/server.crt
- example/Chat/tls/server.key