X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/d7fd5b9d9c2a137d73f2c42751011503ec96dd37..5d1c2193a6c3c98cf426e03eb783eace183e5a0c:/PLP/Apache.pm diff --git a/PLP/Apache.pm b/PLP/Apache.pm index 217546f..a18ed25 100644 --- a/PLP/Apache.pm +++ b/PLP/Apache.pm @@ -4,6 +4,9 @@ use strict; our $VERSION = '1.00'; +use PLP; +require Apache::Constants; + # mod_perl initializer: returns 0 on success, Apache error code on failure sub init { our $r = shift; @@ -39,5 +42,17 @@ sub print { $PLP::Apache::r->print(@_); } +# This is the mod_perl handler. +sub handler { + PLP::clean(); + if (my $ret = init($_[0])) { + return $ret; + } + #S PLP::start($_[0]); + PLP::start(); + no strict 'subs'; + return Apache::Constants::OK(); +} + 1;