]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Index.pm
Make all generators inherit from a common base
[gruntmaster-page.git] / lib / Gruntmaster / Page / Index.pm
index 0214ea6b5c906de88d294e36270f0f131d05dc07..a413e6a9cba5e42a46b98aaeba36519a84bff2e9 100644 (file)
@@ -3,23 +3,13 @@ package Gruntmaster::Page::Index;
 use 5.014000;
 use strict;
 use warnings;
-use parent qw/Exporter/;
-our @EXPORT_OK = qw/generate/;
+use Gruntmaster::Page::Base index => 'Gruntmaster 6000';
+our @ISA = qw/Gruntmaster::Page::Base/;
 our $VERSION = '0.001';
 
-use HTML::Template::Compiled;
-use Gruntmaster::Page::Common qw/cook_templates reload_templates/;
-
-my %orig_templates = (
-  en => <<'HTML',
+use constant TEMPLATES => {
+       en => <<'HTML',
 HTML
-);
-
-my %templates = cook_templates %orig_templates, index => 'Gruntmaster 6000';
-
-sub generate{
-  %templates = cook_templates %orig_templates, index => 'Gruntmaster 6000' if reload_templates;
-  HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output
-}
+};
 
 1
This page took 0.024078 seconds and 4 git commands to generate.