X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLearn.pm;h=95c61821e028f26f49a9ddc034aa4f8690b5597f;hb=bb95f538bf263c0294d87cfb90d58c66117b9aab;hp=8fce8c8dc213a4aacac9957d4d79fd46cf4bae27;hpb=12f5cac9d95e04bb84e47952dd938031557b57c4;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Learn.pm b/lib/Gruntmaster/Page/Learn.pm index 8fce8c8..95c6182 100644 --- a/lib/Gruntmaster/Page/Learn.pm +++ b/lib/Gruntmaster/Page/Learn.pm @@ -3,33 +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 constant FORMATS => [qw/CPP/]; -use constant TITLE => 'Learn Perl'; - -use Fcntl qw/:flock/; -use HTML::Template::Compiled; -use IO::File; -use YAML::Any qw/LoadFile/; -use Gruntmaster::Page::Common qw/header footer/; - -my %templates = ( - en => <<'HTML', -Download interactive-perl-tutorial for Linux | Windows | Mac OS X. -

Get the source from meta::cpan +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 -); - -$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates; -$templates{$_} .= footer $_ for keys %templates; - -sub generate{ - my $template = $templates{$_[1]}; - my $htc = HTML::Template::Compiled->new(scalarref => \$template); - $htc->output -} +}; 1