]> iEval git - gruntmaster-page.git/blame - lib/Gruntmaster/Page/Learn.pm
Add learn
[gruntmaster-page.git] / lib / Gruntmaster / Page / Learn.pm
CommitLineData
12f5cac9
MG
1package Gruntmaster::Page::Learn;
2
3use 5.014000;
4use strict;
5use warnings;
6use parent qw/Exporter/;
7our @EXPORT_OK = qw/generate/;
8our $VERSION = '0.001';
9
10use constant FORMATS => [qw/CPP/];
11use constant TITLE => 'Learn Perl';
12
13use Fcntl qw/:flock/;
14use HTML::Template::Compiled;
15use IO::File;
16use YAML::Any qw/LoadFile/;
17use Gruntmaster::Page::Common qw/header footer/;
18
19my %templates = (
20 en => <<'HTML',
21Download 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>.
22<p>Get the source from <a href="http://example.org/">meta::cpan</a>
23HTML
24);
25
26$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates;
27$templates{$_} .= footer $_ for keys %templates;
28
29sub generate{
30 my $template = $templates{$_[1]};
31 my $htc = HTML::Template::Compiled->new(scalarref => \$template);
32 $htc->output
33}
34
351
This page took 0.026327 seconds and 4 git commands to generate.