X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLearn.pm;h=1ba2e4ed165c7de4f1e9d511c6a1cfdcf9ac69c6;hb=cd9af27e94244e6454c3db787a8ca6811f44fc16;hp=8fce8c8dc213a4aacac9957d4d79fd46cf4bae27;hpb=6d28cb383168de84cebad84aa43900844341bf5d;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Learn.pm b/lib/Gruntmaster/Page/Learn.pm index 8fce8c8..1ba2e4e 100644 --- a/lib/Gruntmaster/Page/Learn.pm +++ b/lib/Gruntmaster/Page/Learn.pm @@ -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 Linux | Windows | Mac OS X. -

Get the source from meta::cpan +Install interactive-perl-tutorial from your nearest CPAN mirror. Run cpan App::InteractivePerlTutorial. +

You can also get the source from git.ieval.ro 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