]> iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Us/Entry.pm
Make all generators inherit from a common base
[gruntmaster-page.git] / lib / Gruntmaster / Page / Us / Entry.pm
1 package Gruntmaster::Page::Us::Entry;
2
3 use 5.014000;
4 use strict;
5 use warnings;
6 use Gruntmaster::Page::Base us_entry => '<tmpl_var name>';
7 our @ISA = qw/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
9
10 use constant TEMPLATES => {
11 en => <<'HTML',
12 <h1><tmpl_var name></h1>
13 Town: <tmpl_var town><br>
14 University: <tmpl_var university><br>
15 Level: <tmpl_var level>
16 HTML
17 };
18
19 sub _generate{
20 my ($self, $htc, $path, $lang) = @_;
21
22 $path =~ m,^us/([^/]+)\.html$,;
23 local $_ = $1;
24
25 $htc->param(name => user_name);
26 $htc->param(town => user_town);
27 $htc->param(university => user_university);
28 $htc->param(level => user_level);
29 }
30
31 1
This page took 0.043874 seconds and 5 git commands to generate.