-);
-
-$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);
- IO::File->new('>meta.yml')->close unless -f 'meta.yml';
- flock my $metafh = IO::File->new('<meta.yml'), LOCK_SH;
- my @problems = map {
- my $meta = LoadFile $_;
- my $id = (m,^pb/(.*)/meta.yml$,)[0];
- +{ id => $id, name => $meta->{name} } } <pb/*/meta.yml>;
- $htc->param(problems => \@problems);
- $htc->param(formats => FORMATS);
- $htc->output
+};
+
+sub _generate{
+ my ($self, $htc, $path, $lang) = @_;
+
+ my @problems = map +{ id => $_, name => problem_name }, problems;
+ $htc->param(problems => \@problems);
+ $htc->param(formats => FORMATS);