X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FUs%2FEntry.pm;fp=lib%2FGruntmaster%2FPage%2FUs%2FEntry.pm;h=cfd9b36bfb22d9c2f0924041e38c65dfd021eb05;hb=bb95f538bf263c0294d87cfb90d58c66117b9aab;hp=5d493ba9fb02518ba51e1e1831f2821eb9ac1c96;hpb=4aa8ba862bf3a79362df73c3d1e8707e8135af23;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Us/Entry.pm b/lib/Gruntmaster/Page/Us/Entry.pm index 5d493ba..cfd9b36 100644 --- a/lib/Gruntmaster/Page/Us/Entry.pm +++ b/lib/Gruntmaster/Page/Us/Entry.pm @@ -3,36 +3,29 @@ package Gruntmaster::Page::Us::Entry; use 5.014000; use strict; use warnings; -use parent qw/Exporter/; -our @EXPORT_OK = qw/generate/; +use Gruntmaster::Page::Base us_entry => ''; +our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use HTML::Template::Compiled; -use Gruntmaster::Data qw/users user_name user_town user_university user_level/; -use Gruntmaster::Page::Common qw/cook_templates reload_templates/; - -my %orig_templates = ( +use constant TEMPLATES => { en => <<'HTML',

Town:
University:
Level: HTML -); +}; -my %templates = cook_templates %orig_templates, us_entry => ''; +sub _generate{ + my ($self, $htc, $path, $lang) = @_; -sub generate{ - %templates = cook_templates %orig_templates, us_entry => '' if reload_templates; - $_[0] =~ m,^us/([^/]+)\.html$,; + $path =~ m,^us/([^/]+)\.html$,; local $_ = $1; - my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]}); $htc->param(name => user_name); $htc->param(town => user_town); $htc->param(university => user_university); $htc->param(level => user_level); - $htc->output; } 1