use 5.014000;
use strict;
use warnings;
-use parent qw/Exporter/;
-our @EXPORT_OK = qw/generate/;
+use Gruntmaster::Page::Base st => 'Standings';
+our @ISA = qw/Gruntmaster::Page::Base/;
our $VERSION = '0.001';
-use HTML::Template::Compiled;
-use List::Util qw/sum/;
-use POSIX qw/strftime/;
-use Gruntmaster::Page::Common qw/cook_templates reload_templates/;
-use Gruntmaster::Data qw/problems jobcard job_result_text job_result job_problem job_user/;
-
-my %orig_templates = (
+use constant => TEMPLATES => {
en => <<'HTML',
<table border>
<thead>
</tmpl_loop>
</table>
HTML
-);
+};
-my %templates = cook_templates %orig_templates, st => 'Standings';
+sub _generate{
+ my ($self, $htc, $path, $lang) = @_;
-sub generate{
- %templates = cook_templates %orig_templates, st => 'Standings' if reload_templates;
- local $Gruntmaster::Data::contest = ($_[0] =~ m,^ct/([^/]+)/,)[0];
- my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]});
+ local $Gruntmaster::Data::contest = ($path =~ m,^ct/([^/]+)/,)[0];
my @problems = sort problems;
my %scores;
} keys %scores;
$htc->param(problems => \@problems);
$htc->param(st => \@st);
- $htc->output
}
1