-sub make_generate {
- my %thing = @_;
- sub {
- my ($self, $htc, $lang, $env, $ct) = @_;
- undef $ct unless $thing{contest};
- debug $env => "Contest is $ct";
- local $Gruntmaster::Data::contest = $ct if $ct;
- my @thing = hgetall $thing{hash};
- @thing = map { $thing{mangle}->(); $_ } @thing if exists $thing{mangle};
- @thing = grep { $thing{choose}->() } @thing if exists $thing{choose};
- @thing = sort { $thing{sortby}->() } @thing if exists $thing{sortby};
- my %params;
- $thing{group} //= sub { $thing{id} };
- for (@thing) {
- my $group = $thing{group}->();
- $params{$group} //= [];
- push $params{$group}, $_
- }
- $htc->param(%params);
+sub list {
+ my ($thing, $lang, $env, $ct) = @_;
+ my %thing = %$thing;
+ undef $ct unless $thing{contest};
+ debug $env => "Contest is $ct";
+ local $Gruntmaster::Data::contest = $ct if $ct;
+ my @thing = hgetall $thing{hash};
+ @thing = map { $thing{mangle}->(); $_ } @thing if exists $thing{mangle};
+ @thing = grep { $thing{choose}->() } @thing if exists $thing{choose};
+ @thing = sort { $thing{sortby}->() } @thing if exists $thing{sortby};
+ my %params;
+ $thing{group} //= sub { $thing{id} };
+ for (@thing) {
+ my $group = $thing{group}->();
+ $params{$group} //= [];
+ push $params{$group}, $_