-sub generate{
- %templates = cook_templates %orig_templates, log => 'Job log' if reload_templates;
- $_[0] =~ m,^(?:ct/([^/]+)/)?log/(\w+)\.html$,;
- local $Gruntmaster::Data::contest = $1;
- my $pages = jobcard / PAGE_SIZE;
+ $path =~ m,^(?:ct/([^/]+)/)?log/(\w+)\.html$,;
+ local $Gruntmaster::Data::contest = $1 if $1;
+ my $pages = POSIX::ceil (jobcard / PAGE_SIZE);