]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Learn.pm
Make all generators inherit from a common base
[gruntmaster-page.git] / lib / Gruntmaster / Page / Learn.pm
index 171a184ae5eeb6e211784239d3833fc5f88eb72d..95c61821e028f26f49a9ddc034aa4f8690b5597f 100644 (file)
@@ -3,25 +3,15 @@ package Gruntmaster::Page::Learn;
 use 5.014000;
 use strict;
 use warnings;
-use parent qw/Exporter/;
-our @EXPORT_OK = qw/generate/;
+use Gruntmaster::Page::Base learn => 'Learn';
+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',
 Install interactive-perl-tutorial from your nearest CPAN mirror. Run <code>cpan App::InteractivePerlTutorial</code>.
 <p>You can also get the source from <a href="http://git.ieval.ro/?p=app-interactiveperltutorial.git">git.ieval.ro</a>
 HTML
-);
-
-my %templates = cook_templates %orig_templates, learn => 'Learn';
-
-sub generate{
-  %templates = cook_templates %orig_templates, learn => 'Learn' if reload_templates;
-  HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output;
-}
+};
 
 1
This page took 0.025189 seconds and 4 git commands to generate.