X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLearn.pm;h=95c61821e028f26f49a9ddc034aa4f8690b5597f;hb=bb95f538bf263c0294d87cfb90d58c66117b9aab;hp=171a184ae5eeb6e211784239d3833fc5f88eb72d;hpb=2b0036ac8e077cc20cf9db6ff8dad4091ab50cb3;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Learn.pm b/lib/Gruntmaster/Page/Learn.pm index 171a184..95c6182 100644 --- a/lib/Gruntmaster/Page/Learn.pm +++ b/lib/Gruntmaster/Page/Learn.pm @@ -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 cpan App::InteractivePerlTutorial.

You can also get the source from git.ieval.ro 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