X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=0159a9d06865f7a3f1132324e171bf310a4c748a;hb=fdbf59e5def9cbb4e1c0749f819ba8d946c37725;hp=e6f44deebfcee2e889a78cd2f5d613b5ffec5da8;hpb=42546e6c1b709dc4c8d8e7048becc14278b6cdf0;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index e6f44de..0159a9d 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -3,54 +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 IO::File; -use YAML::Any qw/LoadFile/; -use Gruntmaster::Page qw/header footer/; +use constant FORMAT_EXTENSION => { + C => 'c', + CPP => 'cpp', + MONO => 'cs', + JAVA => 'java', + PASCAL => 'pas', + PERL => 'pl', + PYTHON => 'py', +}; -my %templates = ( - en => <<'HTML', -