X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=a30263bbba5186ffc9fd58ce5b604f66878d9e1b;hb=b74e5a9fd33cff214d2e6fa0b4ec563b9221fba7;hp=7e4d1634d27ca6ef328cc530b4e095db02c4a976;hpb=2b0036ac8e077cc20cf9db6ff8dad4091ab50cb3;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 7e4d163..a30263b 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -3,46 +3,66 @@ 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 Apache2::Authen::Passphrase qw/pwcheck pwset USER_REGEX/; +use File::Slurp qw/read_file/; +use Plack::Request; -use HTML::Template::Compiled; -use Gruntmaster::Page::Common qw/cook_templates reload_templates/; -use Gruntmaster::Data qw/problem_name problems/; +use constant FORMAT_EXTENSION => { + C => 'c', + CPP => 'cpp', + MONO => 'cs', + JAVA => 'java', + PASCAL => 'pas', + PERL => 'pl', + PYTHON => 'py', +}; -my %orig_templates = ( - en => <<'HTML', -