---
template: "template_toolkit"
package App;
use Dancer2;
get '/' => sub {
return template 'main.tt', {
name => 'Perl Dancer',
};
};
App->to_app;
[% INCLUDE 'incl/header.tt' %]
<h1>main.tt - [% name %]</h1>
[% INCLUDE 'incl/footer.tt' %]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, user-scalable=yes">
<title>[%- name -%]</title>
</head>
<body>
From header.tt
<hr>
<hr>
Footer
</body>
</html>
- Also include navigation etc.