-sub debug {
- local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1;
- $_[0]->{'psgix.logger'}->({qw/level debug message/ => $_[1]})
-}
-
-sub some_auth_required {
- my $r = Plack::Request->new($_[0]);
- return 1 if $_[0]->{'gruntmaster.reqadmin'} || $r->path eq '/action/passwd' || $r->path eq '/submit';
- return 1 if $r->path =~ m,^/ct/$word/pb/$word, && time < $db->contest($1)->stop;
- ''
-}
-
-my %authen_cache;