]>
iEval git - plack-app-gruntmaster.git/blob - lib/Gruntmaster/Page/Us/Entry.pm
5d493ba9fb02518ba51e1e1831f2821eb9ac1c96
1 package Gruntmaster
::Page
::Us
::Entry
;
6 use parent qw
/Exporter/;
7 our @EXPORT_OK = qw
/generate/;
8 our $VERSION = '0.001';
10 use HTML
::Template
::Compiled
;
11 use Gruntmaster
::Data qw
/users user_name user_town user_university user_level/;
12 use Gruntmaster
::Page
::Common qw
/cook_templates reload_templates/;
14 my %orig_templates = (
16 <h1><tmpl_var name></h1>
17 Town: <tmpl_var town><br>
18 University: <tmpl_var university><br>
19 Level: <tmpl_var level>
23 my %templates = cook_templates
%orig_templates, us_entry
=> '<tmpl_var name>';
26 %templates = cook_templates
%orig_templates, us_entry
=> '<tmpl_var name>' if reload_templates
;
27 $_[0] =~ m
,^us
/([^/]+)\
.html
$,;
29 my $htc = HTML
::Template
::Compiled
->new(scalarref
=> \
$templates{$_[1]});
31 $htc->param(name
=> user_name
);
32 $htc->param(town
=> user_town
);
33 $htc->param(university
=> user_university
);
34 $htc->param(level
=> user_level
);
This page took 0.050981 seconds and 4 git commands to generate.