From 4163e23ca4f735a6ca3fd5ec6442fcd0328113b7 Mon Sep 17 00:00:00 2001 From: Arne Georg Gleditsch Date: Thu, 7 Feb 2008 20:32:21 +0100 Subject: Provisions for mod_perl use, take two. --- lib/LXRng/ModPerl.pm | 21 +++++++++++++++++++++ lxrng_mod_perl.pl | 7 +++++++ webroot/.static/.htaccess | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 lib/LXRng/ModPerl.pm create mode 100644 lxrng_mod_perl.pl create mode 100644 webroot/.static/.htaccess diff --git a/lib/LXRng/ModPerl.pm b/lib/LXRng/ModPerl.pm new file mode 100644 index 0000000..686af11 --- /dev/null +++ b/lib/LXRng/ModPerl.pm @@ -0,0 +1,21 @@ +package LXRng::ModPerl; + +use strict; +use LXRng; +use LXRng::Web; + +use Apache2::Const -compile => qw(FORBIDDEN OK); +use CGI; + +use Data::Dumper; + +sub handler { + my ($req) = @_; + + my $query = CGI->new(); + LXRng::Web->handle($query); + + return Apache2::Const::OK; +} + +1; diff --git a/lxrng_mod_perl.pl b/lxrng_mod_perl.pl new file mode 100644 index 0000000..bbb1452 --- /dev/null +++ b/lxrng_mod_perl.pl @@ -0,0 +1,7 @@ +use strict; + +BEGIN { ($LXRng::ROOT) = __FILE__ =~ m,(.*?)/*[^/]*$, } + +use lib "$LXRng::ROOT/lib"; + +1; diff --git a/webroot/.static/.htaccess b/webroot/.static/.htaccess new file mode 100644 index 0000000..68f007e --- /dev/null +++ b/webroot/.static/.htaccess @@ -0,0 +1,3 @@ + + SetHandler send-as-is + -- cgit v1.2.3