make mod_perl request object a global in PLP::Apache only
[perl/plp/.git] / PLP / Apache.pm
index bc788811252a533e48457aca4529033cc1325b2a..6b28f949f1f0b6fd1b9ff7e6c6bc0313d148d4eb 100644 (file)
@@ -21,9 +21,11 @@ BEGIN {
        }
 }
 
+our $r;
+
 # mod_perl initializer: returns 0 on success, Apache error code on failure
 sub init {
-       our $r = shift;
+       $r = shift;
 
        $PLP::print = 'PLP::Apache::print';
        $PLP::read = \&read;
@@ -60,7 +62,7 @@ sub read ($) {
 sub print {
        return unless grep length, @_;
        PLP::sendheaders() unless $PLP::sentheaders;
-       $PLP::Apache::r->print(@_);
+       $r->print(@_);
 }
 
 # This is the mod_perl handler.