fix exit constants usage in apache2
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 18 Mar 2008 01:52:41 +0000 (01:52 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 18 Mar 2008 05:33:24 +0000 (05:33 +0000)
Apache2::Const requires HTTP_* constants to be compiled before they can be
accessed. This caused at least a warning message at the end of each page,
usually:

Use of inherited AUTOLOAD for non-method Apache2::Const::OK() is deprecated

PLP/Apache.pm

index b1744860021a55efe13215389cd7b0bb4be56e87..835f2b4c82ac6e64eed361f1f680b3729f5dd96a 100644 (file)
@@ -16,6 +16,9 @@ BEGIN {
                require Apache2::RequestRec;
                require Apache2::RequestUtil;
                require Apache2::RequestIO;
+               Apache2::Const->import(-compile => qw(
+                       HTTP_NOT_FOUND HTTP_FORBIDDEN OK
+               ));
        } else {
                require Apache::Constants;
        }