X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=b08399e005d4f74e0b666aceafcee0e0decb39d1;hb=68d5c3ff4f6e5c7bf1dd92b85e89883f1020aa8f;hp=3f289d5c50eebb1f6b0e7680a48f07b92346273c;hpb=cd9af27e94244e6454c3db787a8ca6811f44fc16;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 3f289d5..b08399e 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -3,48 +3,64 @@ package Gruntmaster::Page::Submit; use 5.014000; use strict; use warnings; -use parent qw/Exporter/; -our @EXPORT_OK = qw/generate/; +use Gruntmaster::Page::Base; +our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use constant FORMATS => [qw/CPP/]; -use constant TITLE => 'Submit job'; +use Apache2::Authen::Passphrase qw/pwcheck pwset USER_REGEX/; +use File::Slurp qw/read_file/; +use Plack::Request; -use Fcntl qw/:flock/; -use HTML::Template::Compiled; -use YAML::Any qw/LoadFile/; -use Gruntmaster::Page::Common qw/header footer/; -use Gruntmaster::Data qw//; +use constant FORMAT_EXTENSION => { + C => 'c', + CPP => 'cpp', + MONO => 'cs', + JAVA => 'java', + PASCAL => 'pas', + PERL => 'pl', + PYTHON => 'py', +}; -my %templates = ( - en => <<'HTML', -