]>
iEval git - plack-app-gruntmaster.git/blob - lib/Gruntmaster/Page/Src.pm
1 package Gruntmaster
::Page
::Src
;
6 use Gruntmaster
::Page
::Base
;
7 our @ISA = qw
/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
10 use constant CONTENT_TYPES
=> +{
12 cpp
=> 'text/x-c++src',
13 cs
=> 'text/x-chsarp', # Used by GNOME. Not in mime.types.
14 java
=> 'text/x-java',
15 pas
=> 'text/x-pascal',
17 py
=> 'text/x-python',
21 my ($self, $format, $env, $ct, $job, $ext) = @_;
22 debug
$env => "Contest is $ct, job is $job and extension is $ext";
23 local $Gruntmaster::Data
::contest
= $ct if $ct;
25 [200, ['Content-Type' => CONTENT_TYPES
->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [job_inmeta
($job)->{files
}{prog
}{content
}] ]
28 sub variants
{ [[file
=> 1, undef, undef, undef, undef, undef]] }
This page took 0.050188 seconds and 4 git commands to generate.