sub some_auth_required {
my $r = Plack::Request->new($_[0]);
return 1 if $_[0]->{'gruntmaster.reqadmin'} || $r->path eq '/action/passwd' || $r->path =~ m,/pb/$word/submit$,;
sub some_auth_required {
my $r = Plack::Request->new($_[0]);
return 1 if $_[0]->{'gruntmaster.reqadmin'} || $r->path eq '/action/passwd' || $r->path =~ m,/pb/$word/submit$,;
enable_if { $_[0]->{PATH_INFO} =~ qr,^/static/,} Header => set => ['Cache-Control', 'public, max-age=604800'];
enable 'Static', path => qr,^/static/,;
enable_if { $_[0]->{PATH_INFO} =~ qr,^/static/,} Header => set => ['Cache-Control', 'public, max-age=604800'];
enable 'Static', path => qr,^/static/,;
enable \&require_admin;
enable_if \&some_auth_required, 'Auth::Basic', authenticator => \&authenticate, realm => 'Gruntmaster 6000';
Plack::App::Gruntmaster->to_app
enable \&require_admin;
enable_if \&some_auth_required, 'Auth::Basic', authenticator => \&authenticate, realm => 'Gruntmaster 6000';
Plack::App::Gruntmaster->to_app