use 5.014000;
use strict;
use warnings;
+our $VERSION = '0.001';
use File::Slurp qw/read_file/;
use HTML::Template::Compiled;
use Gruntmaster::Data ();
use List::Util ();
use LWP::UserAgent;
+use Plack::Request ();
+use feature ();
my $ua = LWP::UserAgent->new;
my %templates;
sub import_to {
my ($self, $caller, $name, $title) = @_;
+ strict->import;
+ feature->import(':5.14');
+ warnings->import;
+ File::Slurp->export_to_level(1, $caller, qw/read_file/);
Gruntmaster::Data->export_to_level(1, $caller);
List::Util->export_to_level(1, $caller, qw/sum/);
no strict 'refs';
+ *{"${caller}::ISA"} = [__PACKAGE__];
+ *{"${caller}::VERSION"} = $VERSION;
*{"${caller}::strftime"} = \&POSIX::strftime;
*{"${caller}::debug"} = sub {
local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1;
package Gruntmaster::Page::CSS;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
-
-use File::Slurp qw/read_file/;
use CSS::Minifier::XS qw/minify/;
sub generate{
use 5.014000;
use strict;
use warnings;
+our $VERSION = '0.001';
use Gruntmaster::Data;
use Gruntmaster::Page::Base;
-use JSON qw/decode_json/;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
+use JSON qw/encode_json decode_json/;
sub hgetall {
my $hash = shift;
return if $INC{"$fn.pm"};
$INC{"$fn.pm"} = 1;
Gruntmaster::Page::Base->import_to($pkg, $id, $title);
- putsym "${pkg}::ISA", ['Gruntmaster::Page::Base'];
+ 1
}
sub make_generate {
package Gruntmaster::Page::JS;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
-
-use File::Slurp qw/read_file/;
use JavaScript::Minifier::XS qw/minify/;
sub generate{
package Gruntmaster::Page::Log;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base log => 'Job log';
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
use constant PAGE_SIZE => 10;
package Gruntmaster::Page::Passwd;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
-
use Apache2::Authen::Passphrase qw/pwcheck pwset/;
-use Plack::Request;
sub generate{
my ($self, $format, $env) = @_;
package Gruntmaster::Page::Pb::Entry;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base pb_entry => '<tmpl_var name>';
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/];
package Gruntmaster::Page::Register;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
-
use Apache2::Authen::Passphrase qw/pwcheck pwset USER_REGEX/;
-use Plack::Request;
sub generate{
my ($self, $format, $env) = @_;
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',
package Gruntmaster::Page::St;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base st => 'Standings';
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
use constant LEVEL_VALUES => {
beginner => 100,
package Gruntmaster::Page::Submit;
-use 5.014000;
-use strict;
-use warnings;
use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
-
-use Apache2::Authen::Passphrase qw/pwcheck pwset USER_REGEX/;
-use File::Slurp qw/read_file/;
-use Plack::Request;
use constant FORMAT_EXTENSION => {
C => 'c',