X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fapp.psgi;fp=www%2Fapp.psgi;h=2666248f149a201cdfc52eda7c251f5cafe4d698;hp=0000000000000000000000000000000000000000;hb=cdb5cb80047a5a852bf9ba64fb14aa5bc5ef84d5;hpb=a01798debae3ac16607e44f4a8fc32668bf21147 diff --git a/www/app.psgi b/www/app.psgi new file mode 100644 index 0000000..2666248 --- /dev/null +++ b/www/app.psgi @@ -0,0 +1,28 @@ +#! /usr/bin/perl -T + +use strict; +use warnings; +use lib qw(./include); + +# These need to come before the Billig modules, so that exit is properly redirected. +use CGI::PSGI; +use CGI::Emulate::PSGI; +use CGI::Compile; + +use Plack::Request; + +# Older versions of File::pushd (used by CGI::Compile) have a performance trap +# that's hard to pin down. Warn about it. +use File::pushd; +if ($File::pushd::VERSION < 1.005) { + print STDERR "WARNING: You are using a version of File::pushd older than 1.005. This will work, but it has performance implications.\n"; + print STDERR "Do not run in production!\n\n"; +} + +my $cgi = CGI::Compile->compile('/srv/analysis.sesse.net/analysis.pl'); +my $handler = CGI::Emulate::PSGI->handler($cgi); + +sub { + my $env = shift; + return &$handler($env); +}