Files
compiled.world/lib/CW/Plack/Response.pm
2026-08-11 23:10:22 -06:00

25 lines
395 B
Perl

package CW::Plack::Response;
use Moo;
has _response => (
is => 'ro',
init_arg => 'response',
required => 1,
handles => [qw(finalize status body headers header)]
);
has h => (
is => 'ro',
required => 1
);
sub template {
my ( $self, $template ) = @_;
my $html = $self->h->html($template);
$self->_response->body($html);
return $self;
}
1;