]>
Commit | Line | Data |
---|---|---|
42546e6c MG |
1 | package Gruntmaster::Page::Index; |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | use parent qw/Exporter/; | |
7 | our @EXPORT_OK = qw/generate/; | |
8 | our $VERSION = '0.001'; | |
9 | ||
42546e6c | 10 | use HTML::Template::Compiled; |
2b0036ac | 11 | use Gruntmaster::Page::Common qw/cook_templates reload_templates/; |
42546e6c | 12 | |
2b0036ac | 13 | my %orig_templates = ( |
42546e6c MG |
14 | en => <<'HTML', |
15 | HTML | |
16 | ); | |
17 | ||
2b0036ac | 18 | my %templates = cook_templates %orig_templates, index => 'Gruntmaster 6000'; |
42546e6c MG |
19 | |
20 | sub generate{ | |
2b0036ac | 21 | %templates = cook_templates %orig_templates, index => 'Gruntmaster 6000' if reload_templates; |
cd9af27e | 22 | HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output |
42546e6c MG |
23 | } |
24 | ||
25 | 1 |