]>
Commit | Line | Data |
---|---|---|
1 | package Gruntmaster::Page::Learn; | |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | use parent qw/Exporter/; | |
7 | our @EXPORT_OK = qw/generate/; | |
8 | our $VERSION = '0.001'; | |
9 | ||
10 | use HTML::Template::Compiled; | |
11 | use Gruntmaster::Page::Common qw/cook_templates reload_templates/; | |
12 | ||
13 | my %orig_templates = ( | |
14 | en => <<'HTML', | |
15 | Install interactive-perl-tutorial from your nearest CPAN mirror. Run <code>cpan App::InteractivePerlTutorial</code>. | |
16 | <p>You can also get the source from <a href="http://git.ieval.ro/?p=app-interactiveperltutorial.git">git.ieval.ro</a> | |
17 | HTML | |
18 | ); | |
19 | ||
20 | my %templates = cook_templates %orig_templates, learn => 'Learn'; | |
21 | ||
22 | sub generate{ | |
23 | %templates = cook_templates %orig_templates, learn => 'Learn' if reload_templates; | |
24 | HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output; | |
25 | } | |
26 | ||
27 | 1 |