Gruntmaster::Page::generate $what;
}
+generate "learn.html";
generate "${_}index.html" for '', 'ct/';
generate "$_/index.html" for grep {-d} <ct/*>;
declaregen Ct => qr,^ct/index$,;
declaregen 'Ct::Entry' => qr,^ct/$component/index$,;
declaregen St => qr,^ct/$component/log/st$,;
+ declaregen Learn => qr,^learn$,;
declaregen Log => qr,^${contest}log/index$,;
declaregen 'Log::Entry' => qr,^${contest}log/$component/index$,;
declaregen Submit => qr,^${contest}submit$,;
--- /dev/null
+package Gruntmaster::Page::Learn;
+
+use 5.014000;
+use strict;
+use warnings;
+use parent qw/Exporter/;
+our @EXPORT_OK = qw/generate/;
+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 <a href="ipt-linux">Linux</a> | <a href="ipt-windows.exe">Windows</a> | <a href="ipt-mac">Mac OS X</a>.
+<p>Get the source from <a href="http://example.org/">meta::cpan</a>
+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