use POSIX qw//;
use Data::Dumper qw/Dumper/;
use Sort::ByExample
- sorter => {-as => 'pb_sort', example => [qw/beginner easy medium hard/], xform => sub {$_->{level}}},
sorter => {-as => 'ct_sort', example => [qw/Running Pending Finished/], xform => sub {$_->{status}}};
my $optional_end_tags = {%HTML::Tagset::optionalEndTag, tr => 1, td => 1, th => 1};
$tr->find('td')->attr(class => $tr->find('td')->attr('class').' warning') if $data->{private} && !$args{args}{contest};
};
- $tree->find('tbody')->find('tr')->iter3([pb_sort @{$args{pb}}], $iter);
+ $tree->find('tbody')->find('tr')->iter3([sort { $a->{value} <=> $b->{value} } @{$args{pb}}], $iter);
$tree->fid('open-alert')->detach unless $args{args}{contest};
}