big kahuna

This commit is contained in:
2026-08-15 23:05:57 -06:00
parent 6fec70c7c8
commit 84893662ca
25 changed files with 3886 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
# This is the main class for compiled.world, it is instantiated every request
# Routes, database connections, and other data around the request lifecycle are passed
# as attributes, and should not be instantiated per request.
package CW;
use Moo;
@@ -9,6 +9,7 @@ use Plack::Request;
use CW::Plack::Request;
use CW::Plack::Response;
use CW::Migration;
has h => (
is => 'ro',
@@ -46,7 +47,7 @@ sub app {
my $route = $match->{route};
my $pkg = $route->pkg;
my $action = $route->action;
$pkg->new->$action( $request, $response );
$pkg->new( dbh => $self->dbh )->$action( $request, $response );
}
else {
$response->status(404);