X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FSrc.pm;h=e54e79f9840508f0cb696de534054fd765db511c;hb=d3200993969efcd4d9c0ce6a5666a012815ad2d5;hp=8e51d8ba71b676455badcb638a57a5ee1d7f6407;hpb=49c1467ab6c3bfeb9aeba883d29a7be7dfefe93e;p=gruntmaster-page.git diff --git a/lib/Gruntmaster/Page/Src.pm b/lib/Gruntmaster/Page/Src.pm index 8e51d8b..e54e79f 100644 --- a/lib/Gruntmaster/Page/Src.pm +++ b/lib/Gruntmaster/Page/Src.pm @@ -1,11 +1,6 @@ package Gruntmaster::Page::Src; -use 5.014000; -use strict; -use warnings; use Gruntmaster::Page::Base; -our @ISA = qw/Gruntmaster::Page::Base/; -our $VERSION = '0.001'; use constant CONTENT_TYPES => +{ c => 'text/x-csrc', @@ -20,11 +15,8 @@ use constant CONTENT_TYPES => +{ sub generate{ my ($self, $format, $env, $ct, $job, $ext) = @_; debug $env => "Contest is $ct, job is $job and extension is $ext"; - local $Gruntmaster::Data::contest = $ct if $ct; - [200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [job_inmeta($job)->{files}{prog}{content}] ] + [200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [db($env)->job($job)->source] ] } -sub variants{ [[file => 1, undef, undef, undef, undef, undef]] } - 1