]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Learn.pm
Use Redis and reindent code
[gruntmaster-page.git] / lib / Gruntmaster / Page / Learn.pm
index 8fce8c8dc213a4aacac9957d4d79fd46cf4bae27..1ba2e4ed165c7de4f1e9d511c6a1cfdcf9ac69c6 100644 (file)
@@ -7,19 +7,15 @@ use parent qw/Exporter/;
 our @EXPORT_OK = qw/generate/;
 our $VERSION = '0.001';
 
-use constant FORMATS => [qw/CPP/];
-use constant TITLE => 'Learn Perl';
+use constant TITLE => 'Learn';
 
-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>
+Install interactive-perl-tutorial from your nearest CPAN mirror. Run <code>cpan App::InteractivePerlTutorial</code>.
+<p>You can also get the source from <a href="http://git.ieval.ro/?p=app-interactiveperltutorial.git">git.ieval.ro</a>
 HTML
 );
 
@@ -27,9 +23,7 @@ $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
+  HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output;
 }
 
 1
This page took 0.026973 seconds and 4 git commands to generate.