NAME
Trickster - A modern, battle-tested micro-framework for Perl web applications
SYNOPSIS
use Trickster;
my $app = Trickster->new;
$app->get('/', sub {
my ($req, $res) = @_;
return "Hello, World!";
});
$app->get('/user/:id', sub {
my ($req, $res) = @_;
my $id = $req->env->{'trickster.params'}{id};
return "User ID: $id";
});
$app->to_app;
DESCRIPTION
Trickster is a modern micro-framework for building web applications in Perl. It emphasizes simplicity, PSGI compatibility, and production readiness while respecting CPAN traditions.
METHODS
new(%options)
Creates a new Trickster application instance.
get($path, $handler)
Registers a GET route.
post($path, $handler)
Registers a POST route.
put($path, $handler)
Registers a PUT route.
patch($path, $handler)
Registers a PATCH route.
delete($path, $handler)
Registers a DELETE route.
middleware($middleware)
Adds PSGI middleware to the application.
error_handler($handler)
Sets a custom error handler.
to_app()
Returns a PSGI application code reference.
AUTHOR
Trickster Contributors
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.