package App::TemplateServer::Page::Index; use Moose; use Method::Signatures; with 'App::TemplateServer::Page'; has '+match_regex' => ( default => qr{^/(?:index(?:html?)?)?$}, ); method render($ctx) { my $base = $ctx->server->url; $base =~ s{/$}{}; my $head = <<'END'; Welcome

Welcome

Here are the templates that are available:

END return "$head$content$foot\n"; }; 1;