]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Src.pm
From Redis to Postgres - Part 1 (Getting started)
[gruntmaster-page.git] / lib / Gruntmaster / Page / Src.pm
index 6dd5a9c2ad29dc5201a89786628ce2488fa5500b..e54e79f9840508f0cb696de534054fd765db511c 100644 (file)
@@ -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,9 +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] ]
 }
 
 1
This page took 0.02059 seconds and 4 git commands to generate.