use File::Temp qw/tempdir/;
use File::Copy qw/move/;
use Gruntmaster::Data qw/contest_start contest_end push_job set_job_inmeta insert_user PUBLISH/;
-use Gruntmaster::Page::Log;
+
+use constant FORMAT_EXTENSION => {
+ C => 'c',
+ CPP => 'cpp',
+ MONO => 'cs',
+ JAVA => 'java',
+ PASCAL => 'pas',
+ PERL => 'pl',
+ PYTHON => 'py',
+ RUBY => 'rb',
+};
sub aputs{
my ($r, $str) = @_;
defined $private ? (private => $private) : (),
defined $contest ? (contest => $contest, private => 1) : (),
filesize => length $prog,
- extension => Gruntmaster::Page::Log::FORMAT_EXTENSION->{$format},
+ extension => FORMAT_EXTENSION->{$format},
);
set_job_inmeta $job, {
files => {
prog => {
format => $format,
- name => 'prog.' . Gruntmaster::Page::Log::FORMAT_EXTENSION->{$format},
+ name => 'prog.' . FORMAT_EXTENSION->{$format},
content => $prog,
}
}